cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

SubmitForm command changes Gallery.Selected item record

I have an app connected to a SharePoint list. I have a form that is in Edit Mode, and loading from a Gallery via .Selected property. After submitting changes successfully, the Edit Form control is changing the .Selected value to the first record in the data source set. This should not be happening, it should just load the currently selected record. I noticed this change today and last worked on the app late last week. Anyone know why this would happen? I haven't changed anything in the code since last week :(.

 

Thanks!

31 REPLIES 31

This is an excellent solution, thank you! Hopefully the product team will address this at some point. 

Advocate II
Advocate II

For what it's worth, this is still an issue in early 2020, almost 4 years later.

 

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

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,370)