Creating thing if its not there, else modify it

I have a form that I’m building and everytime the user clicks save their data is updated (they can see what the database stores as the form holds the database data in the form). What I am finding is that Bubble won’t create the thing if it doesn’t already exist (which makes complete sense), but what I’m trying to determine is creating the thing first (if it a field, in this case the project name) doens’t already exist in the database.

I have explored using ‘Only If’ in the workflow area, but can’t seem to get what I want. Naturally if I use ‘Create a Thing’ in the workflow, there are duplicates made each time the user clicks Save.

Have you tried using two actions in your workflow? The first would be to modify a thing (only if it exists) the second would be to create a thing (only if the result of step 1 is empty).

Alternatively, you could try two separate workflows that run when the button is clicked, each with a different and mutually exclusive condition on the workflow than the other.

Kevin
Free no-code bootcamp by Airdev

3 Likes