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 / Power apps Patching to...
Power Apps
Unanswered

Power apps Patching to a SharePoint list is overriding other records.

(1) ShareShare
ReportReport
Posted on by 89

Hello,  we have been using this app for about a year now and just after Christmas started seeing a bug in the App. 

 

The user will go in and see a gallery with their teams records in the user will go into each record and update info and save this info using Patch to a share Point list record. 

 

for some users when they have saved their record and then moved into another record from the gallery the power apps is saving the original record but then also saving over the new record that they have clicked into. 

 

i have added some features into the app so that they can't navigate away from a page whilst saving but this hasn't solved the issue can anyone please help? 

 

here is my save code

 

Patch(PDP1,{ID:PDPID},{MidYr_x0020_Ambition:'MyAmbition'.SelectedText,EndYr:MYA.SelectedText,MidYr_x0020_NextRole:NxtRole.Text});Refresh(PDP1); Refresh('PDP1 Objectives')

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Helen_BB 

     

    To help with this issue of things saving over other things intermittently, try having the Patch reference the selected Gallery item directly instead of using bridge variables or bridge collections if possible.

     

    When using those bridge approach it can introduce unpredictability and cause this kind of issue.

  • Helen_BB Profile Picture
    89 on at

    Hi Thank you for this suggestion, previously my code was ..

     

    Patch(PDP,{ID:Gallery1.Selected.ID},{MidYr_x0020_Ambition:'My Ambition'.SelectedText,EndYr:MYA.SelectedText,MidYr_x0020_NextRole:NxtRole.Text});Refresh(PDP); Refresh('PDP Objectives')

     

    and this is when my issue started happening so i swapped over to using a variable yesterday to see if this helped my issue but the problem is occurring in both scenarios.

     

    Do you have any other suggestions? 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Helen_BB 

     

    If instead of single button, you instead put the button on each Gallery item and in Patch statement make sure to always reference the fields from inside the Gallery (they would always have the same control name of course) and also make sure to reference ThisItem instead of Gallery.Selected, does the issue still happen?

     

    You can then try moving it outside the Gallery after that but if you put the button inside the gallery (so there would be one button per record instead of just one button) and rewrite the patch to use ThisItem an make sure it uses the controls in the Gallery, does the issue still occur even so?

     

     

  • Helen_BB Profile Picture
    89 on at

    Thanks for this 🙂

     

    its a bit tricky as there are multiple pages once you click into an item from the Gallery but i can do some testing and see what happens. 

     

    thank you 🙂

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard