Search for - value (of field of type list) in list

I have a table seekers wherein there is the field skills which is a list of text.

I struggle figuring out how to set up the constraint “at least one skills is in skills input’s value” as a seeker can have multiple skills and I want to be able to retrieve any one that has at least one skills included in the skills I want to have.

1 Like

You could try the ‘intersect’ function.
So to check if at least one item from list A is in list B, you can do:
list A's items :intersect with list B's items :count > 0

In your case,
skills :intersect with skills input's value :count > 0

Cheers,
Ranjit | Blur Apps

1 Like

thanks; but I do not see where I should do this as the only options I have in the constraint block are "contains, does not contain, is empty, is not empty ".
I have the impression there is no built-in feature available to do it simply with bubble, the only way is to run a custom js script looping through each seeker, doing the check “skills :intersect with skills input’s value :count > 0”.
And if I was to do that, I would prefer doing it server side, but using toolbox for server scripts, I am facing another issue which I have written here: Advanced search for- included models

In the advanced filter feature I can actually perform this. The issue remains that I would prefer running these types of queries server side rather than client-side

Maybe rethink your DB design to fit the constraints of how you can query data in Bubble? :thinking:

i’ve tried to use several skill fields like skill_1, skill_2 instead of a list of skills. I intended to do a skill_1 is in input_list OR skill_2 in is in input_list; but this will be also be done front-side. so right now i still haven’t found the way to make it

I know this is an old post, but I came across it while facing a similar situation and I was able to solve it, so I wanted to update for anyone who (like me) comes across it in the future.

TLDR: I solved it by updating a permissions rule.

Long Version:

I have products that belong to an organization.

I have users that belong to a list of organizations.

I wanted to display the products assigned to organizations that the user was a member of. Like the OP, I was struggling with this.

The permissions on the product were “When Current Users Organization is This Products Organization”.

I updated to “When Current Users Organization List Contains This Product’s Organization.” This allowed my search to return results!

1 Like

@chad2 thanks for commenting. I’m not working anymore on the app and don’t remember what I ended up doing. So I think I can’t accept your answer as the solution, but I like it and I feel it would be a good workaround :flexed_biceps: