Asynchronous block functions

Hi,

How can I prevent a function to start before the previous function has been completed? See example below:

Capture

In this example I have the 1st funtiction which takes around 10 seconds to complete, then the 2nd function takes around 3 seconds, and then there is an alert to help me understand if two lists included in those function are empty or not. As it current stands the alert shows 0 0 almost immediately (and in the meantime the functions continue to work).

What I would like to achieve is as follows:

  1. 1st function completed, then
  2. 2nd function completed, then
  3. Alert shows

Could you please help me understand how can I reach this result? Thank you!

That screen shot is reeeaaaallly small. Not sure why but if you can upload it again, we’ll be able to see it better.

Also, we’ll need to see the blocks in those two functions. There’s absolutely no way we can advise you without that. Certain blocks will affect this issue such as Create, Clone, database lookups, etc.

1 Like

Check out this technique

2 Likes