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 / Filtered gallery.selec...
Power Apps
Answered

Filtered gallery.selected bug and consequences

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So I am working from a filtered gallery 

 

Filter('Prequal Approvals-DEV', 'Resp. Manager'.Email=User().Email || 'Resp. Executive'.Email=User().Email)

 

and have worked around the issue where the form loads the first record after a patch or submit (see thread1, thread2) by passing the Gallery.Selected into a variable and using that downstream in the forms, patching, etc.

 

Set(varGallerySelected, MyApprovalsGallery.Selected)
-
-
-
Form Item: varGallerySelected

 

 

However...

 

Now when I patch or submit a form, the changes are saved but the screen and form do not update to show the new saved value.

So far I have tried, without any success:

  1. Adding a Refresh(datasource) to the form's OnSuccess property
  2. Adding a manual refresh button to Refresh(datasource)
  3. Adding a Refresh(datasource) to the screen's OnVisible property

The only thing that works is to go back to the gallery, reselect the same item, and then the downstream screens (multiple edit screens) will show the new saved values. My guess is this is somehow refreshing the variable and associated data but I'm not sure.

 

So is there a workaround for this workaround bug/consequence? A better way to do all of this?  I am open to ideas and suggestions.

 

Thank you

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your issue?

    Do you mean that the Edit form does not show up the updated record value after your submit your form data?

     

    Based on the issue that you mentioned, I think this issue is related to the varGallerySelected variable that you mentioned. After you submit your form data successfully, you should also need to update the varGallerySelected variable with the updated record value.

     

    I have made a test on my side, please consider take a try with the following workaround:

    Set the OnSuccess property of the Edit form to following:

    Set(varGallerySelected, EditForm1.LastSubmit)

    or

    Set(varGallerySelected, LookUp('Your SP List', ID = EditForm1.LastSubmit.ID))

     

    Set the Item property of the Edit form to following:

    varGallerySelected

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-xida-msft you are correct, the form does not update after submitting.

     

    Resetting my variable via OnSuccess to the Form.LastSubmit did the trick though, 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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard