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 / Edit a row of data in ...
Power Apps
Answered

Edit a row of data in table using different multiple forms

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

      I'm currently building an app which can create, modify and delete a set of data in a table (Excel file in google drive).
What I'm trying to achieve here is when I click the gallery It'll show a data from the selected row in a viewform, and there'll be a button to edit the data.

      When EDIT button is clicked, it'll navigate to another editform showing the existing answer to be edited. My table has 10 columns of questions, so I separated the questions to be edited into two different forms, but when I wanted to submit, I can only submit one form instead of two together. The other way is by using Patch to submit multiple forms, but by using this, it's creating an entire new row of data instead of saving into the existing row which I wish to edit. 

Any way to work around this ?

Thanks in advance.

Categories:
  • eka24 Profile Picture
    20,925 on at
    I suggest you insert a gallery each on the EditForm. Then filter the gallery to divide the table containing the questions using FirstN(TableName,10) on one gallery. Then LastN(TableName,10) on another gallery. I am assuming you have 20 questions.

    Then set each Edit to Gallery.Selected
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Do you want to patch two forms to the same existing record, right?

    I made a test, it work well, please check my test steps

    1. Add a Gallery and two EditForm with different fields.

    2. set Items property of both editform: GalleryName.Selected

    3. Add a Save button, set OnSelect property: 

     

    Patch('SP list',{ID:GalleryName.Selected.ID},Form1.Updates,Form2.Updates)

     

    Snipaste_2020-03-11_13-50-56.png

    This works well for me to patch two forms to the selected gallery record. Hope this also helps your case.

    If this doesn't make sense, please share more codes and screenshots about your app.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft 

    Your solution seems logical and make sense but I feel I'm doing something wrong, as after followed the OnSelect function you gave, the SAVE button creates a new record instead of updating the existing row with new data. I've attached my OnSelect function for my SAVE button as a image. Please do correct me if I did it wrong.

    What the function says is to PATCH the table VERIFICATIONDETAILS with the COLUMN SUPPLIER NAME from the VERIGALLERY selected parent COLUMN SUPLLIER NAME. I think this is what the function means. What am I doing wrong?

    Capture.PNG
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Oh, sorry, this is my fault.

    What I posted that the template record is set as {ID: Gallery.Selected.ID} is only suitable for SharePoint list.

    In textbook way, the codes should be as follows, use lookup function to get the record you want to modify.

    Patch('SP list',LookUp('SP list', 'Supplier Name'=veriGallery.Selected.'Supplier Name') ,Form1.Updates,Form2.Updates)

    Best regards,

    Sik

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard