Forum Academy Marketplace Showcase Pricing Features

Start do every 5 seconds when button is pressed

Hi there!
I am making an app where when you go to a page, you need to enter some information, which changes everytime, so that you can play along. So when you press a button continue i want it so that a 5 secends workflow starts that sets the last_active to current date/time. This is because other people on the page can see you and when you for example dont fill in ur player name, they see player name: (empty)
So i can just do only show players that last active is smaller than 5

Please help!

A workflow that updates a date every 5 seconds can run even if the user leaves the app open and goes away, so it’s not very useful to sign the presence of the user.
How about assigning a default random user name or just hide the user from the other players until a name is chosen?

@dorilama

So every 5 seconds will always keep runnimg?

Because cant i just set active to true and when lastactive is more than five just set it to false?

I’m just saying that even if you set the date every 5 seconds it does not mean that the user is present and interacting. It only means that the app is opened in the browser.
If what bothers you is that other players will see the empty name for another user that didn’t select a name you have other options.
Do every 5 seconds can easily create problems, even the documentation warns about that, so I’m just suggesting a different approach.

Do you maybe have a diffrent aproach? ohh and also it is an MDT so it doesnt matter if its just open.

Thanks for the help so far!

@dorilama

my suggestion is in the first post…