It’s only updated when the timer is stopped or reset.
thanks!!
@Jeff_Hager Any chance there’s a version of this that simply shows elapsed time given a start date time and the current time OR a stop time?
@Jeff_Hager Actually, I figured it out. It works wonderfully. AND it lets me trigger actions when the timer reaches certain times. Crazy!
That’s awesome!
I would be careful with the json though, and change it so it’s not creating continuous I/O against the database. That could get expensive on Glide’s end. Maybe you don’t even need it to write to a column if you don’t need to use it in the table for anything.
Oh… true. Well, I do need to know when the timer hits exactly 1 hour so I can trigger an action…
The component triggers the action, as opposed to a value changing in the table, so I would think you could still get it to work without actually writing that JSON to the table.
With my version, I only store the json to the table whenever a button is pressed. My json is built from other variables at the moment that button is pressed and then saved to the table. It still uses internal variables to run the stopwatch in real time. I need the json stored so the component can know the current state and refill JS variables based on that json if I leave and come back to the screen. Whereas yours just needs the arrival time stored and it calculates elapsed from that. Based on what I’m seeing in your video, the json is probably not even needed internally or externally to the component.
Hm…except, I have to assume that the user isn’t going to stay on the same screen for over an hour…but I guess that’s true if I’m writing the JSON to the table or not, right?
Just realizing that I doubt the AI component will trigger the email if the app is closed or screen is switched, etc, ya?
Correct
Also correct. Definitely wouldn’t work if they don’t stay on the screen. No active code to run…no execution.