Hello,
I need your help please filtering a list using another list.
Let say each user is described using a list of tags:
User 1 : happy, strong, fast
User 2: sad, weak, slow
User3: happy, sad
These users show up in a repeating group, and I would like to filter the repeating group using another list stored in a state (the state is the result of selecting one or many tag in a multi dropdown menu)
for example I would like to see all users that are sad & slow.
If any user had at least one of these selected tags he should be kept.
in this case User 2 & 3 should show up.
In the filtering constraints of the âDo a search forâ it doesnât work
Why do you think the search constraints donât work? The constraints on a search are ANDâs so this should be exactly what you need. Are you sure you set up your search constraints properly?
Youâd actually need to use the Advanced constraint for this one. It will allow you to use the syntax âcontains listâ where you can pass the state you hold your list in
Yup, what Doug said. I was going to throw the advanced filter thing out there in my initial reply, but I figured weâd start slow and make sure the types match.
Due to this statementâŚ
⌠I believe the advanced filter will need to be a count > 0 of the intersect between the two lists. @akamelstudio, there are plenty of examples of that concept in the forum, so you should be able to find what you need.
The types do match, if for example I change my formula to âActivity Filtersâs SelectedTags First Itemâ it will work.
However what Iâm trying to achieve is to compare two lists, User attributes (Several Tags) with desired filter attributes (Several Tags too) and check if some tags do match with the desired ones.
I wanted to avoid advanced filtering because itâs slower, but I think I have no choice .
I tried this solution and it works great. I wanted to avoid advanced filtering because itâs slow, but it seems that itâs the only one that has âcontains listâ allowing to compare two lists of tags (Userâs attributes vs desired filtered ones).