Complete step 1 before step 2

Hi,

I have

Step 1: Search for items: Filtered (items with X characteristic) and mark them as “Do not delete this item”.

Step 2: Delete all items that are NOT marked as “Do not delete this item”.

However, Bubble is completing step 2 before step 1, so everything is getting deleted.

What can I do to make Bubble complete this steps in order?

Thanks!

Why do you need 2 steps for that?

Can’t you just use the search and filter to delete the items directly, instead of marking them as Do not delete first?

In any case, the best way to ensure step 1 finishes before step 2 is to refer to step 1 in step 2.

I’m assuming your first step is ‘make changes to a list of things’ and the second step is ‘delete a list of things’?

So if you refer to the results of step 1 (i.e. the list of things you’ve set as ‘Do not delete this item’) somewhere in step 2 then it should force it to wait until its done (i.e. do the same search as in step 1: minus list: result of step 1)

1 Like

Its because I need to mark this items for my db organization. The actual mark is not “Do not delete this item”, it says something else that is important, I just used that phrase to make the example simpler.

So I need to delete everything that doesn’t get this mark.

However, it is not a bad idea to take the constraint that I use to mark the items with “Do not delete this item”, write an opposite constraint and use it in the deleting action to find the items that I want to delete.

That way, I would not have to wait for the mark, cause I would be looking directly for the characteristic of the items I want to delete, and then delete them.

I think this will be the best option cause using the “Result of…” won’t work in my case since my result of step 1 does not give me anything useful for my step 2.

Thanks for your help!

1 Like