Others

How to Copy Popup Text to a Selected Power Apps Gallery Item

Rana GarciaRana Garcia Oct 9, 2026 870 views

Question details

The user needs to update a specific record in a Power Apps gallery with text that is inputted via a separate popup window.

How to Copy Popup Text to a Selected Power Apps Gallery Item
Product
Microsoft Power Apps
Device & OS
not provided
Scenario
Entering text into a popup text field and saving that data back to the currently selected item in a Power Apps gallery upon confirmation.
Observed behavior
The user needs the correct formula and logic to ensure the text from the popup correctly targets and updates the selected gallery record's specific field.
Before you start

Ensure your Power Apps gallery data source includes a unique identifier (like an ID column) to accurately target the selected record for updates.

Solution 1Recommended

Use the UpdateIf Function to Target the Selected Gallery Item

Utilize a variable or control reference to capture the popup text and the UpdateIf function to apply it to the matching gallery record based on its unique ID.

To update a specific gallery item from a popup, you need to match the unique ID of the selected gallery item with the ID of the record in your data source. The UpdateIf function is ideal for applying conditional updates to an existing data set.

1
Capture the popup text

Create a text-input control in your popup window (e.g., named 'PopupTextField') or store the input text in a global variable to capture the user's input.

2
Select the confirmation button

Navigate to the button control in your popup that users will click to confirm and save their entered text.

3
Apply the UpdateIf formula

In the 'OnSelect' property of the confirmation button, enter the formula: UpdateIf(Gallery7_1, ID = Gallery7_1.Selected.ID, {Header1: PopupTextField})

4
Customize the formula

Ensure that 'PopupTextField', 'Gallery7_1', and 'Header1' are replaced with the actual names of your text control, target gallery, and the specific field you wish to update.

Use the UpdateIf Function to Target the Selected Gallery Item
Unique ID Requirement: The gallery records must contain a unique ID column for the UpdateIf function to successfully locate and update only the selected item without affecting others.
Free Microsoft Office alternative

Looking for a Free and Powerful Office Suite? Try WPS Office

While managing your applications and data in the Microsoft ecosystem, you might need a reliable and cost-effective office suite for your daily documentation. WPS Office provides a lightweight, fully compatible, and free alternative to Microsoft Office.

  1. 1. Download WPS Office: Visit the official WPS website to download the free installation package for your operating system.
  2. 2. Install the application: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
  3. 3. Open your files: Launch WPS Office and open your existing Microsoft Office documents directly without worrying about formatting loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Easily create, edit, and share data-driven reports and spreadsheets.Lightweight design that runs smoothly on Windows, Mac, Linux, and mobile.Familiar user interface ensuring a seamless migration from other office software.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't my Power Apps gallery item updating when I click the popup confirmation button?

This usually happens if the data source doesn't have a unique ID, or if the formula doesn't correctly match the ID of the selected gallery item. Ensure 'ID = Gallery7_1.Selected.ID' is pointing to the correct unique identifier in your data source.

Can I update multiple fields in a Power Apps gallery at once?

Yes. In the UpdateIf function, you can update multiple fields by passing them within the curly braces separated by commas, such as: {Header1: PopupTextField, Subtitle1: AnotherFieldControl}.

What is the difference between UpdateIf and Patch in Power Apps?

UpdateIf modifies one or more records in a data source that match a specific condition (like matching an ID). Patch is typically used to create a new record or modify a specific single record explicitly by passing the record reference.