Using "if list contains item" as a constraint on repeating group?

I’m sure this is an easy one but it’s bugging me.

I have a data type called “job”. Each “job” can have a number of categories associated with it, which are texts (see below). So a list of texts.

I also have a data type called “Categories” . Each “Categories” has a “Category name” associated with it (i.e. a text)

When I put in the constraint on a repeating group it works fine, but ONLY if the job has a single category.

If a job has more than one category in it’s “Categories” field, it doesn’t show up at all.

I don’t get why.

In my mind, I’m checking to see if the job’s Categories (which is a list of texts) contains the current page’s Category Name (which is a single text).

Any ideas?

Hi @alexcooney5 !

Job’s Categories is a list of CATEGORIES.
Not a list of Text.

So your page must be a Category. And you filter should be:

Categories contains Current Page Categories

Thanks @rpetribu

Unfortunately Job’s Categories is a list of Texts.

Screenshot 2022-06-13 at 20.57.42

And the Category Name field associated with “Categories” is also a text field

Screenshot 2022-06-13 at 20.58.33

Which is why I’m so puzzled about all this :slight_smile:

Solved it!

My items were coming in as one concatenated list, rather than as separate items lol

Screenshot 2022-06-13 at 21.11.37

A few gray hairs from it but problem fixed at least :slight_smile:

Thanks for taking the time to look at my query @rpetribu