Some questions about the delay Flow function on a data variable

As I was following the Todo-app tutorial, I found the flow functions strange in the Logic canvas of Data variable screen.

  1. Why do we need 5 seconds of delay for each operation? Is this to be tolerable for the server response delay?

  2. Upon finishing the delay, why logic flows back to the Get record collection flow function again? This looks like running a infinite for() loop.

  3. At the end of Get record collection, it is strange that the Set data variable is immediately executed as the Delay function starts (because both of them are wired together to the success pin of the Get record collection). Does it make more sense to run the Delay function and then run the Set data variable?

Hi @Tae_Kim

Why do we need 5 seconds of delay for each operation? Is this to be tolerable for the server response delay?

Its a template flow which helps you repopulate your data variable every 5 sec by default. The idea is that if you fetch a record and it changed any bind UI connected with this data variable will automatically refresh.

At the end of Get record collection, it is strange that the Set data variable is immediately executed as the Delay function starts (because both of them are wired together to the success pin of the Get record collection). Does it make more sense to run the Delay function and then run the Set data variable?

As soon as the data is fetched we can start counting the delay. However, you can edit this logic as you wish, this is just a recommended default template.

Best regards,
Pavel

1 Like

Thank you so much! Now I understood!