Hi Everyone
I have gallery in my PowerApps which should be refresh every 4 sec when the timer ends
For the timer property I have added following properties
Inserted a Timer control and set its Duration property to 4000 (for 4 seconds). 2. Set the AutoStart property of the Timer to true. This will start the timer automatically when the app is launched. 3. Set the Repeat property of the Timer to false. This will prevent the timer from restarting automatically when it finishes counting. 4. On the Timer's OnTimerEnd property, add the following formula to refresh your gallery and restart the timer: Refresh(YourGalleryName); UpdateContext({ResetTimer: true}); UpdateContext({ResetTimer: false});
5 Reset property of timer : ResetTimer
the issue Iam facing is after 4sec the timer is not resetting, it keeps on counting from 4, 5,6
After 4 sec , I want gallery should be refresh and the time should be reset to zero (start the count from begining )
Could anyone please help me how do I achieve this
Remove all this from your timers onend property
UpdateContext({ResetTimer: true}); UpdateContext({ResetTimer: false});
5 Reset property of timer : ResetTimer
You're manually doing what repeat does and set auto pause to false.
Didn't spot that , Thanks
But the timer is not counting again after 4 sec the timer stops and not restarting
You've added one zero to much. you've setted it to 40 seconds instead of 4
Inserted a Timer control and set its Duration property to 4000 (for 4 seconds). 2. Set the AutoStart property of the Timer to true. This will start the timer automatically when the app is launched. 3. Set the Repeat property of the Timer to TRUE. This will make the timer restart automatically when it finishes counting. 4. On the Timer's OnTimerEnd property, add the following formula to refresh your gallery and restart the timer: Refresh(YourGalleryName); UpdateContext({ResetTimer: true}); UpdateContext({ResetTimer: false});
5 Reset property of timer : ResetTimer
Repeat property has ti be set to true for what you want to achieve.
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional