Hi @PowerNewUser ,
Would you like to make the Gallery items back to the original status and discarding all modifications in it with clicking a "reset" button?
If so, you may consider using a collection to temporarily store the original items of the table, use this collection as the data source of the Gallery. Then if users would like to reset and discard all modifications in the Gallery they could simply achieve this via re-creating the collection.
1\ Assuming there is a table or collection which you are using as the data source of the Gallery, create an additional collection to store all items:
ClearCollect(colTemp, YourGalleryDataSource)
2\ Use this collection colTemp as the current data source of the Gallery. All the modifications need to patch to the new temp collection.
3\ Add a button, set OnSelect of the Button to re-create the collection
ClearCollect(colTemp, YourGalleryDataSource)
4\ To avoid accidentally click the reset button, you'd better add a popup screen for warning. So modify OnSelect of the reset button to:
Navigate(PopUpScreen)
On the Label of warning message, set Text:
"This will reset/discard all modifications, do you confirm?"
OnSelect of the confirm button:
ClearCollect(colTemp, YourGalleryDataSource);Navigate(GalleryScreen)
OnSelect of the Cancel button:
Navigate(GalleryScreen)
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.