"Contains" formula function

For comparing strings, as well as comparing a collection and a single entity. Does entity x exist in collection y.

Possible with the workaround “Find()” function, but a lot less clean.

2 Likes

It would be useful to be able to check if an item is a member of a collection, when filtering in a formula. Right now the best workaround seems to be to convert the collection to a concatenated string elsewhere (since you can’t call join inside a filter), and check for regex string match on name. This would not be robust to names containing other names, and is more roundabout than it would be if you could check for collection membership.

Somewhat related to this as well, for ways to use collections in formulas: "Union" function to merge multiple collections into a single collections field

I have this need too! I made a request here, I think it’s the same: "Contains" formula function

BTW, you can check the Public ID, it’s more robust than name. I usually make a formula on the entity “Public ID Code”: “{” + [Public ID] + “}”

Then join based on this formula on the entity that has the collection, then run the “contains” check (I usually use Find() instead of regex, but I think either works.)

1 Like

Thanks for the tip! Upvoted your request

1 Like