cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmurfree
Frequent Visitor

Refresh Gallery when Date is Changed

Hi, I have a simple attendance App that allows for multiple inputs within a record in a gallery.  

cmurfree_1-1625071508610.png

I would like to be able to reset all the inputs back to their defaults in two different ways:

  • On a change of date (via the DatePicker)
  • Or on the press of a refresh button

I am really new to this, it seems like it should be easy enough to do, I just have never seen it before so not sure how to.  

 

Any suggestions for either?

 

Thanks!

1 REPLY 1
gabibalaban
Super User
Super User

@cmurfree ,

I don't see the refresh button on your screen. I'll suppose you'll add it later. 

To achive your goal use a context variable (let call it resetable).

Set the OnSelect properties refresh button to:

 

UpdateContext({resetable:true});
UpdateContext({resetable:false})

 

Set the OnChange property of the DatePicker to:

 

Select(RefreshButton) 

 

 And then select all the controls inside your gallery and set the Reset property to: resetable.

 

Here is the result:

gabibalaban_0-1625072846386.gif

 

Hope it helps !

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,779)