Hello!
Has anyone ever ran into this before?
Background:
When a user clicks a button on my app, a workflow is scheduled to begin. The time for the workflow to begin is determined according to a date in the database. In other words, it doesn’t matter when the button is clicked, the process would always start at the same time. That time is changed every week.
The way it’s built is intended to create 1 API workflow per click, per user. In other words, users would only be able to click the button once (a week). That is achieved by a field called (submitted) in the user’s database entry. Clicking the button would schedule the workflow and change the submitted to =“yes”. If Submitted is “Yes”, the button would disappar.
In reality, for some users, I get duplicate workflows scheduled for the same time. I suspected it might be someone clicking the button multiple times, but I couldn’t replicate this so far.
Is there a way to prevent this from happening?
What I thought of / tried so far:
UI: So far, I’ve hidden the button once it’s clicked first, and then set up the rest of the actions (eg scheduling the workflow)
Backend: Is there a way to prevent a workflow from being scheduled twice by the same user, or perhaps going over all the scheduled workflows and programatically remove duplicates?
Thanks in advance