Hello Gliders! l have a grid table that needs to be updated every time the user modifies one of the modifiable columns. Thus I have a button that does that. Originally the button would call a trigger workflow with a loop in it, in order to go line by line in the grid table updating every item (by the way, this loop takes like 20 seconds to update just 24 rows. Its a long time. Is this normal?). But I wanted the button to disable as soon as the user presses it. I tried many things like placing the trigger workflow inside an app interaction workflow (that runs upon button press) so that I could write a flag in the users table before the loop begins so that I could disable the button. But at button press, the button remains able for a few seconds before it becomes disabled due to the flag. ls there a way to disable the button immediately after pressing it?
It’s normal to me, looping is not fast. If you want something faster, I would suggest using an API call with a mutation batch.
I have done something like this before. I set a column somewhere, say “Locked”, to a true boolean value, then trigger the workflow. Then you have two options here:
- At the end of the workflow, do something to set the “Locked” value back to false/empty.
- Have a query/rollup/relation, whatever you need to know that the item update has been completed, add a wait for condition in the original action for that condition to become true, and then set the “Locked” value back to false/empty.
The WAIT FOR CONDITION solved the problem. Thanks Thinh!
Actually, I am still facing a problem. About one out of every five times I run the “toggle” workflow, I get a timeout failure as you can see in the attached. The weird thing is (1) I did not change anything in GLIDE, so why would it sometimes fail and sometimes not? and (2) I set 180 seconds before the timeout, but when it does timeout, it does after a minute (not after 3 minutes). Any ideas? Thanks!
I would check the workflow side for that specific run to see if all rows have been processed.
If that side works as intended, I would submit a ticket.