Forum Academy Marketplace Showcase Pricing Features

Or Statement Possible?

Is there a way to configure Bubble workflows using an Or statement?

I would like the ability to set something up like From = AutocompleteDropdown Departure Airport Code’s Value’s City OR Input XXXXXX

Which ever input has a value in it.

Here is the front end of the two inputs… It should either take one of the two inputs into the single field in the database… depending on which one has content or a selection. I’m not sure how to setup this OR statement.

No, but you can merge searches.

Ok so merging two fields provided one is empty will handle this correct?

And make sure one is conditionally empty when the other valid to ensure two entries dont get mashed together?

No, I’m guessing you’re working on constraints now right? So you have two searches with different constraints and you merge them.

I’m working on 2 inputs into 1 essentially in the workflow section to take either of two inputs and save it in the dB under that 1 field.

You could mimic an OR function by creating multiple workflow blocks (as opposed to having 1) in this case, I think?..

If you are saving the value “from” to the DB - you could have a workflow block that says:

When “this dropdown is not empty” (or whatever your workflow is) AND departure airport codes value is empty AND “input XXXXX” value IS NOT empty.

Make changes to From = Input XXXX


You know what I mean??

  • you may have to have 3 workflow blocks though…

dropdown empty - input xx not empty
dropdown not empty - input xx empty
both not empty
— make changes to “from”

There’s multiple ways you could accomplish the requirement.

You could disable the second field if a value was entered in the first using the Conditions tab. Do the opposite for when the other field has a value.

Then in the workflow, add additional qualifications to the button that submits the form.

Another option would consist of only showing one field. Maybe use a checkbox to hide the first field and show the second.

2 Likes

Good advice! I forgot about the further restrictions on the 1st step of the workflow level!

1 Like