Non exclusive Do a search for a List of thing of another List

I am trying to search in my DB in a list element for an other List.
But I would like to have an non exclusif result.
For Example :
I have in my database :
Car 1 - Blue
Car 2 - Red, Blue
Car 3 - Green
I would like to be able to search for all cars which are Blue OR Red.
Result = Car 1 - Card 2

For now I only find a way to find cars which are Blue AND Red.
Result = Car 2

Do anyone of you know if i can do it or is this a bubble limitation ?

Thank you in advance for your help,

Hi @lise.nicolas, you can accomplish this in Bubble, it’s just a little trickier than you might expect. I’ll outline a couple options below.

If there are only a few (let’s say less than 4) values that you wish to match for - for example: 3 colors (red, blue, white) - then your best bet is to use a couple search expressions with the merged with operator. You can check out an example of this here.

If for whatever reason you cannot use a merge here, you can use an advanced filter [:filtered + Advanced] without using a merge. You can view an example of this from the link above.

If you need to match based on more than a few values, you can use the intersect with operator. You can also view an example of this from the link above. Basically, you’ll want to add an advanced filter which says: This Car’s Colors intersect with [insert some list of texts - can be custom state, database field, repeating group source, etc] first item is not empty. What this does is checks to see if there is any overlap between the two lists. So at a high level, you are saying: show me all cars whose list of colors shares at least one value with my list of desired colors.

Let me know if I can clarify any of the above!

AirDev - Custom Software for Everyone

1 Like

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