Hi,
I am trying to start a timer when the time in my text box changes, I am trying to create a lone worker app, so when someone clicks the check in button on the app the time updates in my SP list, I then have another app with details of the lone worker in the gallery, this is where each time they click check in and update the time on my SP list which in turn will update the time on my new app text box, I am trying to start the timer using on change on the text box but it wont start the timer. I have entered the below.
Timer control
Autopause and autostart both false
Start "TimerGo"
Textbox
Default "ThisItem.'CheckIn Time'
OnChange "UpdateContext ({TimerGo: true});"
I'm new at Powerapps and I know this is a complex app but I am enjoing learning how to use powerapps.
Any help would be much appreciated
Ed
Solved! Go to Solution.
Hi,
I have tried the following and it worked: in the "On Change" property of the textbox try Set (TimerGo,true) and it worked.
Bobby
Hi @EdyMac ,
On the OnChange
UpdateContext({TimerGo: false});
UpdateContext({TimerGo: true})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi,
I have tried the following and it worked: in the "On Change" property of the textbox try Set (TimerGo,true) and it worked.
Bobby
Hi Bobby,
just tried that and its not working for me, does it make a difference that im doing it in the gallery ?
Ed
Hi @EdyMac ,
On the OnChange
UpdateContext({TimerGo: false});
UpdateContext({TimerGo: true})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz,
I tried your formula and it didnt work so to test it I added a new screen and it does infact work 👍, is the issue maybe because the text box is being updated (Changed) from my SP list ?
Ed
Hi @WarrenBelz,
When I manually change the textbox it works but not when its updated automattically from my SP list.
Ed
Hi @EdyMac ,
Correct - the OnChange event needs to be triggered by the user changing the value. If you want to change when the screen opens, put it OnVisible of the screen.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz,
starting the timer when a new item is created in the gallery could work, I've tried putting set(TimerGo, true) on the OnVisible property but the timer doesn't start when a new item is created. how could i acieve this.
Ed
@EdyMac ,
It should work, but try also using a global (Set) variable on the new form trigger
User | Count |
---|---|
256 | |
103 | |
92 | |
47 | |
37 |