Forum Documentation Showcase Pricing Learn more

Make workflow wait on DB update?

Hi all,

Quick question, currently after a user sends an input to the database, I want a couple of calculations to be performed. It appears however this does not work because the database is not finished yet updating and thus data of an earlier entry is used for the calculation ( search for…last item). How can I make sure the calculation is only done after the database update has finished?

Hi @SenorPelota, did you get any answer to your question or where able to solve the case ? I am having the same issue: on a simple page, clicking on a button starts a workflow that creates 48 entries in a Thing and then a RG shows those entry. The problem is that the workflow ends fast but the data are not already update. As a result the RG shows only a portion of the list.

Is there a way to set up a workflow step that actually waits until data are update before run ?

Is it still happening with the following approach?

Generally speaking, if you want to make sure that action 1 is run after action 2, you have to use “result of action 1” in the conditions of action 2. Otherwise, Bubble tries to speed things up and the order might be another.

In all the 48 “create things” action (except the first, of course) I added the condition “only when … result of previous step is not empty”. But then I run into another problem. The workflow start with showing a spinner popup, then hide a collapsable group, then create things (48 times) and at the end hide the popup and show the repeating group that lists the 48 records newly added. In step-by-step and slow debug mode everything is fine. But in normal mode there is no way to see the popup as well to show the final step (RG with the results). Now I was thinking about using a custom event for the create things actions, to be inserted in a normal workflow. What do you think, @reger-alexander ? Any other advice ? Thanks

Have you also put according conditions on the hide/show actions? The hide popup action for example should have the condition “only when result of…” the last step of the 48 create things steps is not empty.