cancel
Showing results for 
Search instead for 
Did you mean: 

Add a Reset property to galleries

There is no Reset property to galleries that when toggled will reset the selection to the Default item.

This is strange since Reset is present for example in text inputs and other controls that also have a Default property.

Please add the Reset property to galleries.

Status: Completed

The reset functionality has been added to the Gallery control.  To reset a gallery, simply call Reset(GalleryInstanceName)

 

Note that this will reset the gallery to its initial state, but will not recursively reset all the children of gallery.

Comments
Level: Powered On

I just looked back at my code, and i had to use a variabe (which you might already be doing) in order to make this work correctly.  

 

Change this to use a variable that you update:

Gallery1.Default=LookUp(Employees,ID=368)

 

On your New/Add button or OnChange():

UpdateContext({CurrentEmployeeId:Text(GUID())});  // or set to your current Id

 

Default: 

Gallery1.Default=LookUp(Employees,ID=CurrentEmployeeId)

 

Then your Reset() should work.