Having trouble with delete a thing timing

Hi there,

I am having with the timing of the delete a thing action. I want to put the value of a thing into a custom state before deleting the thing. However as soon as I click the button that triggers this workflow the thing is deleted and the custom state is not filled because there is no longer anything to fill it with. The delete action is placed at the end of the workflow, and I’ve even tried using delays to stop it but to no avail.

Thanks in advance for any help.

Cheers,
Johnny

Hi Johnny! Bubble workflows execute in a parallel fashion, and not in a series or step-wise. You can however, force it to execute in a step-wise fashion by appropriately using conditions.

For example if there are 2 steps, Step 1 and Step 2 in a workflow, there can be cases where Step 2 could execute before Step 1. However, if you put a condition on Step 2, which refers to the result of Step 1, in that case, you’re forcing it to move in a step-wise fashion.

More information on this can be found here - Order of Operation - #2 by aschofer

It seems assigning to a state and afterward deleting the thing will clear the state. Is it an option for you to give that thing a flag like ‘toBeDeleted’ or ‘archived’, assign it to a state but not to delete it until you finished the other logic you wish to perform? Logic, tables, repeating groups etc. can filter based on the flag and exclude the thing. Afterwards you can always permanently delete it.

Another option would be to save properties / field data from that thing to specific states, delete the thing and perform any actions using those states.

Hi thanks for the responses.

Instead of allocating the thing to the state I changed it to take just a string that I needed. That partnered with using the “get result of a step” seems to have sorted the issue.

Thanks guys.

Johnny

2 Likes

Awesome! Glad I was able to help :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.