Search for... Constraint Contains any

I’ve not been able to find a solution to this after searching the forums.

Users have a field called Category which is connected to a Category Option set.

I’m trying to do an API workflow on a list and the list to run on I want it to be on any users who have any of the categories on their user: category that the Job post has.

For example, I’m creating a job post with 2 categories(Animation & Directing). I want to run on any users who have either Animation or Directing in their Category list.

In my example, I’m using a State for the page which would contain all the selected categories in case they click the publish button before saving the job post to the database.

This seems like it should be a pretty simple thing to do if we had a “Contains Any” option, but without that it does not seem to work.

I’ll add that I’ve tried doing an “intersect with” but for some reason it keeps asking for (more) at the end, and the text stays red.

Hi there, @eric10… this thread Nigel just posted sounds like what you are trying to accomplish, so I thought you might want to take a look at it.

Try adding :count>0 after the intersects with operator and see if that produces the desired result.

Hope this helps.

Best…
Mike

Thank you Mike. I’m having a hard time on the first part. I need it to look at the users Category field compared to the list of Categories in the Job posts State. Right now it’s comparing the user with the categories which is obviously not correct.

You are going to need to use an advanced filter on this one. So, give this a shot… get rid of everything after Search for Users. Then, add the :filtered operator after Search for Users. In the filter editor, add a constraint and select the Advanced option from the dropdown (it’s all the way at the bottom of the dropdown). Finally, construct a constraint that looks like this: This User's category's intersect with position-edit's Categories_State:count>0

1 Like

Perfect. It seems to be working as expected. Thank you for all your help!

1 Like