How to close the "expression"?

Hello everyone…

I’m trying to do a search on the Database.

I have a Repeating Group that displays all the options that the user might check and another one that displays the result based on the Options that the user has checked.

I’m using a custom state to hold the values of “checked items


The list of options is Option Set.

The search that I’m doing (on Repeating Group) has only those options to choose from, and obviously, I’m choosing contains.


Then is the name of the page search follow by the name of the custom state Option.


When I chose First Item the search works fine. But of course, the user might choose more than one. So I tried :each Item’s Display which is evaluated as text (I don’t know why because everything is Option Set), and it’s requesting to “close the expression” but I don’t know how. It continues to choose forever whatever it comes…

Anyone any idea how to make it work?


This method only checks the existence of one value in one list, you are going to check the existence of a list of values in another list.

To make this list of checks, it is better to use “minus list”.

What you want to do is put no search constraint, then do :filtered after the search, then do Advanced: (last option at the bottom), then do the expression This [thing]'s option intersects with [your custom state list]:count > 0

‘Contains’ is used to check if a list contains a single item… it can’t be used to compare two lists…

To compare two lists, you’ll need to use either ‘contains list’, or ‘intersects with’ - neither of which can be done directly in a search constraint, so you’ll have to use an advanced filter for that.

1 Like


What other methods can I use? I don’t want to use Advanced because it will be thousands of records on the client side.

And I don’t want to use Intersect with either. It works on the client-side too.

I didn’t get it @NoCodeDataArtisan
What minus list are you referring to?

1 Like

The way I suggested is according to your goal, but it is slightly different from the current way you have taken.

As far as I have experienced, it does not have db search and filter, so it is faster and lighter.
This method works for all type of data. (Text, number, option set, custom data)

In the data source section of RG, bring all the options and do not use any filter in the search (related to this topic).

Then, in the next step, select “minus list” and then bring the state in which you put the selected options.

That’s all, you don’t need to use advance filter or contains list.

I have 30 constrain in this RG. I’m filtering a lot of things. Like Pirce, Color, Model, Make, etc (by the way, is a Vehicle Listing) I’m stuck on the last one, Options.

Now I really don’t know how to apply your method.
And if I need to change something in the database, I will (like change the Option Set)

I need to make it work.

Thanks for the answer.

Oh, I misunderstood. :disappointed_relieved:

I was involved with same challenge for a while.

By now, you have probably filtered the normal fields, and since this is a list, you have a problem with it, right?

Unfortunately, after you create this filter, you will face a new challenge, when the list of filtering options is empty.

So, it is better to place a condition on RG if the filtering options count > 0.
Then, change the RG data source, copy exactly the same as in the default data source + add a filter method (choose from the list, I don’t mean the filter in the do search section). Here you can use the advance option, and as other friends said, set it something like this for advance:
options of this car contain list filtering option (the user selection) list.


Let me think about this one, probably not the right database structure due to Bubble’s limitation on these search constraints…

1 Like

I hope you help me. I can share my database structure if it will help you.

Thanks for the answers.

1 Like

If you could not do it with these explanations, tell me and I will give you an example.

1 Like

well if you like I can share my editor with you and you can give a look what I have done and what is possible to solve the problem

1 Like

sure :+1:

you can message me or contact me by : [email protected]

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