I wanted to have a button when 1 rider clicked it. only 1 can cater and then order will disappear from that queue.
I already tried using true/false and (change value input) to hide button after clicked.
But when 2 or more “Rider” click ACCEPT to an order at the same time, all of them will get the current order. What can I do to prevent others from entering the order?.
use a true/false parameter in your custom list to hide the button, set up instant refresh of the list, optionally put a date/time parameter to assign the command to who clicked on it first
create a date/time field in your commands collection, on the button you add an update action, and you update the date/time field with the current time value
I resolved this issue adding a buffer time to collect all the “accept” from the riders.
After few seconds there is a list of riders that axcept the delivery, sorted by the time of answer.
Is like a race… the first win.
You can show to the rider the list and tell “sorry you are arrived second!!” or “You WIN!”
I don’t think ther is other way to manage real time click.