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 pagesearch follow by the name of the custom stateOption.
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…
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.
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)
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.