Unfortunately, in “Do a Search” we don’t get “is in” constraint. The only options are “Contains” , “Doesn’tContain” and empty/isnt empty. Contains only matches the first item in the list.
If you could have, inside each “case” the same list but also the representation of this list as a text, you can use the “contains keyword(s)” to make the Search.
Sorry, just read your original post to the end, and seems you are aware of this.
I doubt that any plugin can solve this as all of them work with client data not with raw server db data.
But if your request is to check whether there is exact match of all strings(not intersect of some): I think you can have one workaround that should actually work on server.
You can have extra field in db that stores all list items as sorted alphabetically joined text, e.g. “ABC,BCD,CDE…”. For Thing 2 list you can have the same.
And after that “Do a search for…” can just have Thing1’s joinedList is Thing2’s joinedList
This is a current limitation when we need to use comparisons (filters) of this type, applying constraints at server-level.
I think things like this have been discussed in the past and are recurring. So, if the operators discussed in this thread below were added, it would be very useful. Take the opportunity to vote on this request in the ideaboard.
The suggestions of a field with a list of text to be a replica of the list of ‘things’ works well enough. Just remember the tradeoffs associated and the need to keep them in sync, neither needs to be a deal breaker.
Hi Rafael,
Thank you for the great advice and taking the time to build out the demo. It works great.
Sadly Working on complex ideas in Bubble requires us to maintain a whole database of workarounds. This is a nice addition to that database for me
Hey @rpetribu I followed your solution and it works great when the result is what the OP expected.
List 1 field contains all texts from List 2
But I was just trying to use this in a different approach and ran into another limitation.
Basically something like.
List 1 field contains at least one option (text) from List 2
Imagine I have a list of products:
Product 1
Product 2
Product 3
Product 4
And each product has a list of categories.
Product 1
Category A
Category B
Product 2
Category A
Category C
Product 3
Category B
Category D
Product 4
Category A
Category D
Even if I create a simple text field to store this as a “list of texts”, and have a multi dropdown as a filter where I select the following options, I’ll get the following result for each case:
Options selected: Category A, Category B Products returned: Product 1
In Case 2, I wanted to return all products that contain one of the two selected options. In this case, all products should be returned, since they all have either Category A or Category B.
Here I’m giving an example with few options, which in extreme cases could be solved with an intersect with for each option. But this becomes impractical when using dozens of options as filter.
Do you or anyone else have any ideas on how to approach these cases?
Do a Search for Procucts
Where
Advanced: This Products Category’s intersect with List 1 : first item is not empty
By doing this, you will return all products that have a list of categories that, when compared to the categories in list1, have at least one similar item.
But when using advanced filtering, this will be done on the client side, correct? Is there any way to do this on the server side since the amount of data is large?