Search for count of thing after create thing does not show correct count

I have this workflow wherein I am creating a thing, cart item, and after creation, I am trying to get the quantity.



It’s populating the Cart table properly, here:

But trying to see console logs does not display the correct quantity
Image 3-23-23 at 10.54 PM

I’m trying to use it for a condition I have but it gives out very unexpected results. What might be going on here?

Scheduled backend workflows are asynchronous and get scheduled right away.
There is no guarantee that the data you are creating in the backend workflow is available in the actions in your workflow.
Usually in bubble you don’t want to create something and then search for it right away because the search result will be inconsistent.
Either create the thing in the database with an action create new thing and then use result of workflow in subsequent actions or you need to keep track of the progress of your backend workflow by using another “utility” data type.