cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericmlee1
Frequent Visitor

Power Apps Navigates to Another SharePoint Item Record After Saving

Greetings!
When I navigate to a Gallery item (the gallery source is SharePoint) and make a change to the record, the details screen navigates to another item in the list. The save action is successful, but the user is strangely taken to another record without additional action.
Youtube Capture of Issue: Link

 

ericmlee1_0-1648648411661.png

1. Click an item from the Gallery

ericmlee1_1-1648648445509.png
2. Click Edit

ericmlee1_2-1648648540927.png
3. Make a change to any data card element that updates the connected SharePoint column
4. Click Save

ericmlee1_3-1648648582772.png
5. We get back to the appropriate record while we wait for the data to refresh
ericmlee1_4-1648648614508.png

6. But once the save action is successful, we're immediately taken to a different item. Any similar sequence on any item will always bring me back to ID: 1637.

Any assistance or advice would be greatly appreciated!

 

 - Eric

 

 

4 REPLIES 4
fuzzy_fuzz
Resolver II
Resolver II

 

Hi, @ericmlee1

My guess is that when you save the form you refresh the database or you Reset the Gallery, and auto selects the Gallery's first Item. 

Do you reference the form item as Gallery.Selected? BC if what I said above is correct, Gallery.Selected changes.

 

Waiting for your reply. 

@fuzzy_fuzz,
Thank you so much for your insight! 
1. You are correct; after making a change to the record, the app loads the first item in the gallery view.
2. My OnSelect for the "save changes" button is 

SubmitForm(form_detail_edit)

I'm unclear as to where Gallery.Selected would show up or how to fix this issue. Any additional guidance would be most appreciated. Thank you!

 

 - Eric

 

Gallery has a 'Default' property which is the 'default selected row'.  I leave this set this to an empty set { }

 

@ericmlee1 

What I sometimes do when I want to edit a List Item is saving it into a variable. On your point 1, when you select the Abacus APM, set a variable.

 

Set(varItemSelected; Gallery.Selected)

 

Then, wherever you have Gallery.Selected (gallery items, edit form Item...) replace it by varItemSelected. Everything should work without any further changes.

 

Anyway, try what @jriemsma says because it might solve your issue easier.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,805)