Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

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

Topic Labels: Formulas
1479 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Shaun_Hughston
6 - Interface Innovator
6 - Interface Innovator

Hi

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.

Thanks!

1 Reply 1

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).