Hi guys. My app runs really quirky. When I edit a record from gallery and submit the changes, it displays first record from gallery, instead changed record. What is wrong? How can I fix it?
Solved! Go to Solution.
Hi @MonteTT,
Do you mean that your form display the first record instead of the changed record after submitting?
Could you please share a bit more about the Item property of the Form?
I have a test on my side and it works as expected if I set the Form Item property as Gallery.Selected. Every time you submit the form, the form will always display the latest edited record.
How you set the Item property of the form will decide what it displays. If you do not have extra filter formula for your Gallery Items, I would suggest you sort the Gallery items based on the modified, which will make the Gallery always display the latest edited record as the first one and you would never worry about the form display issue.
You could consider setting the OnSuccess and Item property of the Form as below:
Refresh(ListA) // OnSuccess property
Set the Gallery Items property as below:
Sort(ListA,Modified,Descending)
Hi @MonteTT,
Do you mean that your form display the first record instead of the changed record after submitting?
Could you please share a bit more about the Item property of the Form?
I have a test on my side and it works as expected if I set the Form Item property as Gallery.Selected. Every time you submit the form, the form will always display the latest edited record.
How you set the Item property of the form will decide what it displays. If you do not have extra filter formula for your Gallery Items, I would suggest you sort the Gallery items based on the modified, which will make the Gallery always display the latest edited record as the first one and you would never worry about the form display issue.
You could consider setting the OnSuccess and Item property of the Form as below:
Refresh(ListA) // OnSuccess property
Set the Gallery Items property as below:
Sort(ListA,Modified,Descending)
Hi @v-qiaqi-msft .
I had already set Item as BrowseGallery1.Selected in both, Display form and Edit Form.
In the BrowseGallery1 are records ordered by title ascending and user can filter by multiple criterias. However, all ran correctly at start developing and app. So I think I set something wrong later. But I have no idea what it could be.
Anyway, if I change ordering the records by update date as you suggest, app runs correctly. Thank you for hint 🙂