SearchBox Constraint "OR"

For whatever reason, there is no logical OR condition in “Do a Search…” operations. (Search criteria are logically ANDed together.)

The Bubble method for ORs in searches is to MERGE the results of the two criteria.

For example:

Let us say we want the list of all Users with FirstName “Keith” OR FavoriteThing “Taco”.

This can’t be constructed in a single Bubble Search, but you can still do it as a “one liner”.

For clarity, the list of all Users with FirstName “Keith” is:

Search for Users (criteria FirstName = Keith)

The list of Users whose FavoriteThing is “Taco” is:

Search for Users (criteria FavoriteThing = Taco)

The list of Users that meet the first or second criterion is:

Search for Users (constraint FirstName = Keith):merged with Search for Users (constraint FavoriteThing = Taco)

Keep in mind that if there’s a User named Keith whose fave thing is tacos, they will appear only once in the resulting list (which is of course what you want in most cases).

4 Likes