web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating Form for Data...
Power Apps
Answered

Creating Form for Dataverse Items in Gallery

(0) ShareShare
ReportReport
Posted on by 70
Hello!
 
I currently have a Gallery that is displaying items from a Dataverse table. I want to make an edit button that will create a popup window that will give users a Form control to allow them to make changes to that dataverse item. I know how to make a popup window using visibility properties, and I know that the edit button will need to store the id of the gallery item to give to the form control for context, but I don't know how to get the form control to read the properties from that row item id and populate the form values with what's already in the dataverse entry. Then a user can enter make edits to the content in the row item and save changes. Is there any way to do this? I'm trying to avoid creating individual text inputs and creating a power automate flow to update if I can do all that within a form control. Thanks!
Categories:
I have the same question (0)
  • Verified answer
    MichaelFP Profile Picture
    2,001 Moderator on at
    I think that is doable to do that without Power Automate.
     
    First thing is to store the whole record when you select (OnSelect)
     
    Set(varSelectedItem, ThisItem);
     
    Now configure you Form control with the following properties:
     
    - DataSource: the same table of the record
    - DefaultMode: FormMode.Edit
    - Item: varSelectedItem (the item that you saved on the variable)

    Because you have your whole record (that is from the same table) the form it will load fine with the data.
     
    -----------------------------
    If my answer helped you, please give me a thumbs up (👍). 
    If solve your question please mark as answer ✔️. This is help the community.
    If you want talk with me just tag me @MichaelFP 
     
     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Yes — this is exactly what the Edit Form control in Microsoft Power Apps is designed for. You do not need Power Automate and you do not need to manually create individual inputs. The form can automatically load the selected record from Microsoft Dataverse and save updates.
    • store ThisItem from the gallery
    • set the form Item property to that record
    • use SubmitForm() to update Dataverse
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @AB-03121629-0
     
    Yes, you can do this directly with an Edit Form control.
     
    Please follow below steps to do:
    #1. On your Edit button inside the gallery, open the popup and switch the form to edit mode:
    EditForm(YourFormControlName);
    UpdateContext({_selectedItem:ThisItem,_openEditPopUp:true});
    
    
    //YourFormControlName - Replace with your form control name
    #2. Add an Edit Form inside your popup.
    #3. Set the form’s DataSource to your Dataverse table.
    #4. Set the form’s Item property to the selected record from the gallery:
    _selectedItem
    This will load the selected record into the form, allow the user to edit it.
     
    #5. For the Save button in the popup, just submit the form:
    SubmitForm(YourFormControlName);
    
    //YourFormControlName - Replace with your form name..
    #6. Select the Form control and go to the OnSuccess property.
    ResetForm(YourFormControlName);
    UpdateContext({_selectedItem:Blank(),_openEditPopUp:false});
    
    //YourFormControlName - Replace with your form name.
    When the form submission is successful, the OnSuccess property will execute, which resets the form and closes the popup.
     
    Your can use _openEditPopUp variable to open and close the PopUp upon clicking on Edit Icon.
     
    Reference link for more details: 
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
     
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    Hi @AB-03121629-0

    To allow users to edit a record from a Gallery and update the Dataverse table, we use a Power Apps Edit Form (out-of-box control) inside a popup container. The form is connected directly to the Dataverse table so it can automatically load and update the selected record.

    1. Edit Button in the Gallery

    When the user clicks the edit button, we store the selected gallery record in a variable and open the popup.

    Set(varEditRecord, ThisItem);
    Set(varShowPopup, true);
    EditForm(frmEdit)
    

    ThisItem represents the current gallery row.

    2. Popup Visibility

    The popup container is shown only when the variable is true.

    Visible = varShowPopup
    

    3. Edit Form Configuration

    DataSource

    'Your Dataverse Table'
    

    Item

    varEditRecord
    

    This binds the form to the selected gallery record and automatically populates the fields with existing Dataverse data.

    4. Save Button

    When the user saves, the form updates the Dataverse record.

    SubmitForm(frmEdit)
    

    5. Close Popup After Save

    Set the form OnSuccess property:

    Set(varShowPopup,false)
    

    This approach avoids creating individual input controls and Power Automate flows because the Edit Form handles loading, validation, and updating the Dataverse record automatically.

    For more details refer: Edit form and Display form controls in Power Apps - Power Apps | Microsoft Learn

    Article: How To Create A Pop-up Menu In Power Apps - Matthew Devaney

    I hope this works!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard