Refreshing a variable returning the current date

Hi! We have an app variable of type function that returns the current date:

return moment().toISOString()

Is there a way to force the variable to update (for instance, once a minute), without building a separate layer of logic to refresh it manually?

Hi @Joanna,

As far as I know, the only way to achieve this is by using a timer.

If you add a timer to trigger at a chosen interval (for example, every 60 seconds), you can then create an action that updates your app variable accordingly.

Thank you, @Simona, that works for our case :ok_hand: