Create a counter with daily reset

Hey everyone,

I am trying to set up a counter that resets daily and also want to created a new datatype called statistics to be created everyday for each user that contains a specific user role. Then there are 3 buttons and if one button gets clicked from the current user, I want this count to go up by one, so each user can indivually track there data. Iam somehow struggling on setting this up because I don’t know how and where to begin. I have already set up the datatype thats it. Would be very grateful fore the help, thanks.

Lars

anyone?

Have a daily recurring backend workflow (the BE workflow schedules itself to run in 24 hours)

Have a backend workflow that takes a User as a parameter and creates the Statistic.

In the recurring backend workflow, Schedule API workflow on list of Users with the specific user role.

1 Like


Thanks for the Reply!
Iam having this set up but not actually figuring out what logic is needed to complete the loop.

You need to do this. You need two backend workflows with actions as described above.

Okay thanks, I did what you said, but is there another option to trigger the event without an frontend trigger? I just updated the site clicked a buttun to activate it and then delted the button so its running now, or did I mess up?

No, that’s right :slight_smile: You need to set it off in the front-end first (probably from an admin panel) using Schedule API workflow.

1 Like

Yeah alright Thanks again! :))

How do i terminate it? Copy and paste the workflow to reset? Or does Copying it copys the schedul also?

I’m not sure what you mean, sorry. Workflows are scheduled in the Scheduler (see Logs section). You can cancel them there, or by using the Cancel scheduled API workflow action.

1 Like