Constraint: list-to-list

Hello :wave:

I have a Repeating Group displaying Users, that works fine by default.

And I then have a menu to filter this Repeating Group (using MultiDropdowns and a trigger button).

I’d like to filter the Users to match all the items selected.
But for now I cannot have the Constraint to work for :any/all item but only :first/last/random item, etc.

For example, below, “Activity Area” is a list of items both in the database (User field) and the filtering dropdown, but somehow the Constraint needs something “(More…)”.

Of course, “Activity Area” and “Interests” are Lists of another Data Type :
bubble2

So these fields can contain several items, just as the filtering MultiDropdown.
But in Bubble I get this issue message:
bubble3

What did I miss? :no_mouth:

NB: a workaround (although slower since that would load the whole list of Users) could be to do a basic “Do Search For” with no Constraints but :filtering it afterwards. But it doesn’t work either

Hey @LucM,

Unless something has changed, I think you can only do this in an Advanced Filter not in a Search. If you have a ton of users and can’t reduce the count through search constraints, filtering could be slow…but I think it is your only built-in option.

Once you select :filtered you’ll see Advanced as an option at the bottom. Inside that, you find a contains list option.



Looking to improve your Bubble™ skills?

Let me turn
:thinking: :tired_face: :confounded:

into
:grinning: :sunglasses: :woman_student:

Coaching and Development at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

2 Likes

Thank you @mebeingken, your solution worked :pray:

Fortunately, there will not be tons of users in my case so it shouldn’t be too slow.

NB for others facing the same issue:

  • This solution doesn’t work if the User fields “List” (here “Activity Area” and “Interests”) are empty in the database (eg User Joe doesn’t have any Interests listed)
    (Tried to play around with this, with no luck => mandatory field)

Thanks again Ken for taking the time to reply and for solving this! :+1:

Glad it worked out! Depending on what your desired list contains, consider also that you can combine those two advanced constraints, into one and evaluate using OR, or AND…so This User’s Activity Area contains list Sector’s value OR This User’s Interests contains list Interest’s value. Similarly you can add consideration for if the multi-dropdown is empty, etc. All depends on your desired result.

1 Like