I have a quick question: could you please confirm whether the method “Cancella Ultima Row..” is executed asynchronously with respect to the others?
In other words, will “Set Label 2 Text” wait for the above function to finish before running, or will it execute at the same time asynchronously?
Hi @maurizio.polverini89
The blocks are asynchronous, which means that it doesn’t wait until their action is finished before starting the next action.
By adding a wait block, these blocks act synchronously (wait until the function is finished executing before letting other blocks execute).
When the wait block is used, it makes these blocks act synchronously, even if the waiting time is set as 0.1 seconds. This is how it is designed to work in the background by the engineers.
Thank you for your kind answer, may you confirm that the wait block acts like you said.
The reason behind my question is the following: even after adding the wait block, the method still runs asynchronously, and the “Set Label 2 Text” action executes without waiting for the “Cancella Ultima Row” method to complete.
It’s hard to say whether this is a minor issue or something specific on my side, but I can confirm that “Set Label 2 Text” does not wait until “Cancella Ultima Row” finishes — and that’s why I had to increase the wait block from 1 to 3 seconds.
Hi @maurizio.polverini89
Thank you for sharing more information.
This is probably happening because the function doesn’t have any return block so for the blocks on the screenshot, the function block is executed.
So, a solution is to add a return value or to move the blocks from the function above the wait block.