Repeating group, custom states and searches

I have a list of people, and I have already made a repeating group where if I enter for example a “name” in the Search Names box, the RG will display only people with said name.

Now, as another filtering option I have created tags: a person is associated with 1-5 tags. I want to be able to filter according to 1-5 filters (so red hair, blue eyes, female or only blue eyes, or green eyes and male). I can’t figure out how to do this.

I created a custom state on the element, and made the custom state into a LIST, because it could have up to 5 different tags.

Now in the RG I am doing a search so it only shows what I want it to show. And I can’t get the expression to work for these tags.

Can anyone help me? The AI bot has not been able to solve it, and Bubble’s help wasn’t too helpful, so I am now asking for your sweet help!

Thank you a million!

For this case where the list of tags contains the list of selected tags, unfortunately you have to use :filtered → Advanced.

Keep everything else as it is there, but remove the “Tags” constraint, add :filtered, inside it put Advanced, and then it would be something like This Person contains list Leads - List’s Selected_tag

Always try to use as many server-side constraints as possible; Advanced runs client-side.

Thanks for the suggestion! I will try this.

1 Like

You were very helpful, but I’m not there yet, can you tell me what I am missing? As you see, I still have an issue.

You need to use the “contains list”.

Your custom state is of type Tag, and the list checkbox is also checked, right?

YES!!! Thank you SO much! You are a star!!! :woman_bowing: :bouquet: :champagne: :sparkler:

1 Like

I’m glad it worked out! :partying_face:

Mark my comment as the solution please :slight_smile:

Do note that “Contains List” means that the entirety of the constraint values must be in the compared list.

For example, when comparing 1,2,3,4,5:

  • constraint of 1,2,3 will result in True
  • constraint of 1,2,6 will result in False
1 Like