Hello guys,
I am having a hard time traing to use Timer Control in PowerApps, here what I need to do:
I have an app that should display a message every time user clique on an info icon, but should display it for a short period of time. The problem is: I have about 5 info icons, so every time a person click on the icon the time should start and count, but when the person switch to another icon the timer should restart and start to count from the beginning.
I dont know if I was clear, but if someone have an ideia of how to code it, please, feel free to say.
Ps: Until now I tried to use AutoStart and Reset properties, however, when a Timer is reseted it doesn't start again, it just stop.
Solved! Go to Solution.
Ayla,
My suggestion is that you stop the timer, reset the timer, and then have the timer start again.
- The timers Start property is set to a context variable.
- A Labels text value is set to a context variable
- The Icons onSelect property looks something like: UpdateContext({varTimer: false}); Reset(Timer1); UpdateContext({varTimer: true, varMessage: "Message1"})
I created a simple sample that I have attached. Hope this is what you are looking for or maybe I misunderstood your question.
@Anonymous
You should be able to use a context variable as the value for the timer start, that way you can set it to ture and false based on a button click. On you icon on Select event you should be able to stop the timer via the variable, use Reset(TimerName) and then start the time again.
Hi,
The problem is that the timer doesn't start again, I tried use Repeat as true, but still, when I Reset the timer, it doesn't start again from the beginning.
Ayla,
My suggestion is that you stop the timer, reset the timer, and then have the timer start again.
- The timers Start property is set to a context variable.
- A Labels text value is set to a context variable
- The Icons onSelect property looks something like: UpdateContext({varTimer: false}); Reset(Timer1); UpdateContext({varTimer: true, varMessage: "Message1"})
I created a simple sample that I have attached. Hope this is what you are looking for or maybe I misunderstood your question.
Thats perfect! Exactly what I needed.
Thanks a lot!
@MikeLockwood, that solved my issue too. Thank you so much!
User | Count |
---|---|
139 | |
132 | |
75 | |
72 | |
69 |
User | Count |
---|---|
214 | |
199 | |
64 | |
62 | |
54 |