Skip to main content

Notifications

Community site session details

Community site session details

Session Id : vpDqppljMtGe8F5AKoxuhL
Power Apps - Building Power Apps
Unanswered

Patch gallery update

Like (2) ShareShare
ReportReport
Posted on 23 Jul 2024 08:26:57 by 73
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
  • NWEASD Profile Picture
    174 on 03 Feb 2025 at 17:00:28
    Patch gallery update
    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})
    )
  • Cosan Profile Picture
    73 on 29 Jul 2024 at 15:56:39
    Patch gallery update
    The dropdown is
     
    When I put the patch in for the submit button ThisItem is not an option
  • Cosan Profile Picture
    73 on 25 Jul 2024 at 08:01:26
    Patch gallery update
    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
  • jagdeepdua Profile Picture
    Microsoft Employee on 23 Jul 2024 at 17:38:31
    Patch gallery update
    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...  
     
  • KeithAtherton Profile Picture
    3,646 Most Valuable Professional on 23 Jul 2024 at 16:55:42
    Patch gallery update
    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});
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard