Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

REGEX_MATCH formula works on one table and not the other

Topic Labels: Formulas
Solved
Jump to Solution
370 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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!?

1 Solution

Accepted Solutions

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

See Solution in Thread

2 Replies 2

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

Scott,

You are the man!

Thank you!