Skip to main content
Solved

REGEX_MATCH formula works on one table and not the other


Hello,

I’m pulling my hair out… I have the following formula:

REGEX_MATCH({Products},"Personal")
{Products} is a ‘A Name’ column and the above formula produces a 0 if “Personal” is not present in the column’s field and a 1 if “Personal” is present in the column’s field.

Using the same formula on a different table:
REGEX_MATCH({Products},"Personal")
{Products} is a ‘Lookup’ column and the above formula produces a 0 if field is blank and a #ERROR! if not blank.

The only difference between the two scenarios is the top formula is checking a ‘A Name’ column and the bottom formula is checking a ‘Lookup’ column.

What am I missing? Why am I getting an #ERROR!?

Best answer by ScottWorld

Welcome to the community, @Brendan_Picha!

A lookup field is not a string, it is actually an array.

So you will need to turn it into a string first by adding a blank string after it like this:

{Products} & ""

So your entire formula would look like this:

REGEX_MATCH({Products}&"","Personal")

View original
Did this topic help you find an answer to your question?

2 replies

ScottWorld
Forum|alt.badge.img+20
  • Brainy
  • 8754 replies
  • Answer
  • April 1, 2021

Welcome to the community, @Brendan_Picha!

A lookup field is not a string, it is actually an array.

So you will need to turn it into a string first by adding a blank string after it like this:

{Products} & ""

So your entire formula would look like this:

REGEX_MATCH({Products}&"","Personal")


  • Author
  • New Participant
  • 1 reply
  • April 1, 2021

Scott,

You are the man!

Thank you!


Reply