I am having an issue with my app. And I have noticed this issue in all of my apps as well. I am trying to add a “Time” area in my app where the user will be able to see the current time in “Zulu”. For some reason, and I am not sure of the reason, the time is frozen until I refresh the page.
Here is an example of what I am trying to achieve:
If there is any way to fix this so the time updates properly without refreshing the page, that would be amazing.
Thank in advance!
Getting the current date/time is basically a “snapshot” of the exact time it’s run (on pageload or when the element becomes visible in your case), so it doesn’t automatically refresh until you tell it to.
Here’s one way to solve it:
- Place your text element inside a group (if not already), and set that Groups Type of Content to date and the Data Source to Current date/time.
- Set the text element’s text to Parent group’s date:formatted as 10:44:35 (just to test that seconds are updating, you can remove this later)
- Then, you need to set up a workflow to update the content of the group at regular intervals. In our example, it makes sense to do this every second. The event description will say every 5 seconds, but don’t worry, you can change this:
Add an action that updates the data source of the Group:
And voila! Your timer will update every second:
Thank you very much! This worked. It’s showing the time properly now!
This topic was automatically closed after 70 days. New replies are no longer allowed.