Change data variable on specific time

Hi I want to reset a data variable every day. I was thinking to use:

IF(FORMAT_DATETIME_LOCAL(NOW(), “HH:mm”)==“23:59”,true,false) and then update the record.

But I need an event to trigger this. How can i do that?

Thanks

Hi,

Hmm are you using a 3rd party database? These kinds of actions should be done in the backend preferably, since as you said there is no event triggering this on the Composer (frontend) side. Maybe some sort of hack to achieve this would be to save the datetime of when the app was used (i.e. App launched in the global canvas gets triggered), and with every app launch check if the day has changed compared to the last app use time. If it has, then reset the data variable.

But as I said, the safest way to do this would be in the backend :slight_smile:

thanks for the reply. I will give it a try