one of the main screens in my app displays a collection of numbers that opens up an overlay when clicked (intended to give users a chance to confirm their selection). i have a button block with the options to Cancel or Confirm, which i had configured with custom actions.
one small problem - the overlay has an X button that cant be configured to behave the same way the Cancel does. i tried current and main screen options, but they have a back button that adds to the/has the same issue.
i can do a main screen display, but the back button won’t clear the temp data that i need to be cleared with the cancel button.
basic premise is, a slot should only be claimed by one user. on my previous post, @Darren_Murphy already advised me this may be a problem due to the race condition.
as a workaround, i am working on a multi-step process where, when clicked - this gets added to additional columns in the users table, which in turn will determine who clicked first and only allow the first clicker.
if they cancel - i need to clear these temp values to free up the slots to other users and/or clear the race condition.
side note: i only have this issue since there is some kind of delay from the time a user clicks on a slot and the UI gets to hide the slot (@Robert_Petitto helped me in a big way in setting this up and i have a schedule with him on wednesday. im only trying to edit what i can prior to that meeting).
when the UI gets updated (sometimes it takes up to 10 seconds for some reason) - then the clicked slot gets hidden and there’s no race condition at all
Understood your problem. There’s lag communicating between the first clicker’s device, the “main” database, and the second clicker’s device, hence the delay. If using Make is an option, I would suggest sequential processing over there, and have a module to query the right table, to check if the slot has been reserved. If already reserved, send an email to the user to tell them it has been reserved, otherwise use an add/edit row action to give them the slot.
I ran into this same issue and to get the effect I wanted was to use a set column values action for the button or action item that opens the overlay to begin with. Using that action to clear a value or set a value prior to opening the overly. This in effect could clear a value upon opening, or set it to something else prior to opening == the same as using a “Cancel” button that would clear a value.