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

Does FIND() work for linked-record fields?

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

Hi all

I want a field to only display if this condition is met:
{Session Status} is “ :sparkles: Public. Live on web.”

(Session Status} links to the [Session Status] table. One of the records in there is named “ :sparkles: Public. Live on web.”

When I write a formula for: FIND({Session Status}, “ :sparkles: Public. Live on web.”) I get 0 as a result.

I am guessing FIND() isn’t reading that field because it is a linked record. Any workarounds come to mind?

Thanks!

1 Solution

Accepted Solutions

I believe {Session Status} is coming through as an array - namely, an array of linked records.

The FIND() function requires that you pass it a string to search for the matching string - it doesn’t know what to do with an array.

The good news is, you can coerce that array into a string with just the name of the record as the string content. You can do that by simple concatenating the field reference with an empty string. That would look like this:

FIND({Session Status} & "", "✨Public. Live on web.")

That & "" is concatenating an empty string onto the end of the array, forcing the array to behaving like a string.

See Solution in Thread

2 Replies 2

I believe {Session Status} is coming through as an array - namely, an array of linked records.

The FIND() function requires that you pass it a string to search for the matching string - it doesn’t know what to do with an array.

The good news is, you can coerce that array into a string with just the name of the record as the string content. You can do that by simple concatenating the field reference with an empty string. That would look like this:

FIND({Session Status} & "", "✨Public. Live on web.")

That & "" is concatenating an empty string onto the end of the array, forcing the array to behaving like a string.

Amazing tip, thanks! Worked like a charm.