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:
- Adding a Refresh(datasource) to the form's OnSuccess property
- Adding a manual refresh button to Refresh(datasource)
- 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