Struggling to compare lists of tags

Hi, I have a Multidropdown where the user can select a combination of tags. The source is a list of texts.
Then I have a RG on a Data Type that has a field named “Tag” set to be a list of texts. Each thing may contain a different combination of tags in the Tag field .

I would like the RG to update depending on the input in the Multidropdown.

I did a Do a search on my Data Type with Tag contains Multidropdown’value but it doesn’t work when Multidropdown contains more than one tag.

In particular:

When Multidropdown = “red” the RG shows:

Item 1 “red, yellow”
Item 2 “red, blue”

And this is fine.

But when Multidropdown = “red, yellow” the RG is empty while it should show item 1

Note that I can only use contains:
Screenshot 2024-04-22 alle 01.16.15

Thanks in advance for your help!

I think advanced filtering works in this case. Simply, you dont narrow down the data source in the do a search for.... You just get the whole data, then, continue to filtered operator and choose advanced filtering. And in the advanced filtering, the constraint will be 'This item’s tag intersect with Multidropdown’s value is multidropdown’s value` or something along these lines.

I’m going to assume that you want to give the user the ability to filter items based on the tags selected. Simply follow these steps:

  1. Create a popup called “Hidden” and place a repeating group here called “RG Tags”. The data type of this repeating group should be “tag”
  2. Set up workflows such that it adds and removes tags from “RG Tags” when the multidropdown is updated. These workflows would be 2x the number of tags you have and would go something like: When multidropdown A’s value is changes and multidropdown A’s value contains “red” >> Display list in “RG Tags” - “RG Tags”'s list of tags: minus item: “red”
    and another for the reverse condition: When multidropdown A’s value is changes and multidropdown A’s value doesn’t contain “red” >> Display list in “RG Tags” - “RG Tags”'s list of tags: plus item: “red”
  3. Final step, set up the condition for viewing on the repeating group you set up initially (the screenshot you attached). “Tag contains RG Tag’s list of tags”

I usually do it this way while building filters, it’s really fast when it comes to loading things, but might not be the best approach if you’ve got a lot of tags (which would mean setting up a lot of workflows in step 2).

Hope things work out for you!

Thanks to all. I can’t use @aleemansari97 solution as every user has his own set of tags. In any case I managed to solve the problem. I’m sharing the solution here in case any Bubbler stumbles upon this thread.

The RG has to display a list of Things from a Data Type X. Each Thing has a field “Tag” with a different combination of tags stored as a text list.

I want the user to select a combination of tags in a Multidropdown and the RG to update accordingly.

In the RG did a Search for Data Type X:filtered In the filter box I selected “Advanced” and set:
Multidropdown'value intersect with This Data Type X'Tag:count is Multidropdown'value:count

In practice, for each Thing, I’m asking that the intersection between:

  • Multidropdown’value, e.g. “yellow, blue”
  • Thing’s Tag, e.g. “yellow, blue, red”

has to be equal to the number of tags selected in the Multidropdown (i.e. 2 in the example above).

This topic was automatically closed after 70 days. New replies are no longer allowed.