Find any part of a string/array within a string/array


I have a lookup field that is displaying values from a multiple select field, which I have converted into a comma-separated format.

Let’s say the values in that field (field A) are:

Cat, Dog, Antelope, Lion

I have another field (field B) that has the possibility of having at least some of the same values as the first field. It might look like:

Lizard, Elephant, Cat, Eagle

The order of the variables is, well, variable because the user may enter them in whatever order they wish.

What I need to do is evaluate whether any of the terms in field A match any of the terms in field B.

In this case, it would return true because ‘Cat’ appears in both.


Unfortunately this isn’t currently possible in a formula because formulas can’t iterate through a collection of items and perform operations on each item in the collection. However, this is definitely doable with a script, either in a Scripting app (available to anyone) or an automation script action (available in bases that are in Pro-plan workspaces or higher).

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.