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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch gallery update
Power Apps
Unanswered

Patch gallery update

(2) ShareShare
ReportReport
Posted on by 82
Hi. I'm creating a canvas app. It has a gallery connected to SP List. one of the fields in the gallery I've made a dropdown for the user to update the status. But I don't know how to submit the change back to the list to only update that item and not create a new line. This is what I have now. I know its wrong, but I don't know what it should be.
 
Thanks
Categories:
I have the same question (0)
  • KeithAtherton Profile Picture
    3,705 Most Valuable Professional on at
    Hey. To update a record, change the Patch() function call to reference the record which needs to be updated, like this:
    Patch(POAP, Gallery4.Selected, {'POAP provider':drp_response.Selected.Value});
     
  • jagdeepdua Profile Picture
    Microsoft Employee on at
    Hi. The response from Keith is absolutely spot on, but if I can offer a very very slightly modified version of it? Instead of using Gallery4.Selected to identify the record you want to patch. I prefer to use ThisItem instead. ThisItem represents the current record in the gallery row, so by clicking on your drop down, you will ThisItem will be the row where your drop down is. The code would look like this :
    Patch(POAP, ThisItem, {'POAP provider':drp_response.Selected.Value});
    two ways to do exactly the same job...  
     
  • Cosan Profile Picture
    82 on at
    Thanks, but neither of those answers worked. ThisItem wasn't an option, but I typed it in anyway.
     
    I'm wondering if I did something wrong in the gallery
  • Cosan Profile Picture
    82 on at
    The dropdown is
     
    When I put the patch in for the submit button ThisItem is not an option
  • NWEASD Profile Picture
    174 on at
    If you are trying to do this with a button outside of the gallery, you can do something like this.
     
    ForAll(
       RenameColumns(Gallery4.AllItems, ID, TempID),
       Patch(POAP, Lookup(POAP, ID = TempID), {'POAP provider':drp_response.selected.value})
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard