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 / OnSubmit navigates to ...
Power Apps
Unanswered

OnSubmit navigates to latest item

(0) ShareShare
ReportReport
Posted on by 6

As you open the app there is a gallery which is showing a list of entries from my master data list, from SharePoint.

 

When I select to open an item it navigates to a new screen ('Navigate(scr1)'), which displays the selected item details in a view form (Item= gallery1.Selected).

I have added a button to allow me to edit the form details for this selected item. Once I have edited the fields and click the submit button, which has only 'SubmitForm' and 'ViewForm' (previously had 'ResetForm') in the code, the form then changes from the item I previously selected in the gallery to the latest item in the gallery/list.

 

Any reasons why this may be happening?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anni 

    The SubmitForm button should not contain anything other than SubmitForm(yourformname), anything else should be in the OnSuccess property of the form as you don't want it to execute until the form is successfully submitted.

  • Anni Profile Picture
    6 on at

    Thanks. Even with just 'SubmitForm(formname)', the form changes to show the latest item details 

  • Anni Profile Picture
    6 on at

    This has now been fixed

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anni 

    What changed?

  • Anni Profile Picture
    6 on at

    The filtering I have inputted on the gallery, 'Items', was pushing the change of item shown on the form after editing the fields and submitting. To avoid this I have updated the filtering, a workaround really, but it works for what we need. Whereas before I was ordering the gallery by a field ('Project code'), in descending order, I have changed this to 'Modified', descending. 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard