Showing results for 
Search instead for 
Did you mean: 
Not applicable

Detail Record Card Switches After Use of "Patch"

Accept DateAccept Date



I am experiencing a strange behavior.  On my Edit Detail card, I have added controls to populate a date in SharePoint Online.

The user must choose a toggle button which make the "Accept" button enabled.  Using the "On Select" property enables the date to be saved to the data source.  The date is saved successully, however after I patch the record the user detail field goes the first record instead of staying on the record that is currently selected.


Patch(ActiveUsers,First(Filter(ActiveUsers,BrowseGallery1.Selected.DistinguishedName = DistinguishedName)), {MoveDate: MoveDatePicker.SelectedDate + Time(Value(HourDropdown.Selected.Value), Value(MinuteDropdown.Selected.Value), 0)})


I cant determine how it is possible but the only thing differrent is the addition of the Patch that is executed.  Anyone have ideas on why my detail card switches from the current record to the first record?  What might be a workaround to keep the current record the current record?


Thank you,





I completely agree. I've been struggling with SO many needs for work arounds!



@sfishe"An annoyance that still remains is that I can often see PowerApps refreshing the form - showing the wrong or old data first before the above functions get applied. We really shouldn't have to be doing these types of workarounds..."


That last bit is what exactly is happening to me, and i need to fix it as you can see in the gif in my post:


It really is an annoyance, have you found a solution yet??


Advocate II
Advocate II

For what it's worth, this is still an issue in early 2020, almost 4 years later (there is a similar post to this one from 2016).


I have a filtered gallery and when using Patch on a form, if using Gallery.Selected the form or fields in question will patch correctly but then the data refreshes or reloads the first record in the gallery, not the selected record.


The work-around of setting gallery.selected to a global variable and then referencing that everywhere (Item property and Patch function) works but was a pain to research and resolve. 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,476)