I'm trying to use either a SEARCH() or FIND() function to locate a comma within a string. Unfortunately, these seem to be broken on Airtable right now. Am I missing something? This should be pretty straightforward, right?
Hey @Cody_Winchester,
Given that Job Title field is a lookup (array) rather than a string, your formula should convert the array into a string first as the SEARCH formula will only work with strings. Please try the formula below (I've already tested it on my side).
SEARCH(",", ARRAYJOIN({Job Title (from Detail)}))
Mike, Consultant @ Automatic Nation
Hey @Cody_Winchester,
Given that Job Title field is a lookup (array) rather than a string, your formula should convert the array into a string first as the SEARCH formula will only work with strings. Please try the formula below (I've already tested it on my side).
SEARCH(",", ARRAYJOIN({Job Title (from Detail)}))
@Mike_AutomaticN , I had thought of this. However, in this instance, it actually isn't an array but a single job title that contains a comma. This is why I was trying to isolate it using the formula. The formula works in the source table, but there seems to be a loop hole when returned through a Lookup field. Maybe it isn't possible in this unique instance to find a comma in a lookup field using SEARCH() or FIND()?
@Mike_AutomaticN , I had thought of this. However, in this instance, it actually isn't an array but a single job title that contains a comma. This is why I was trying to isolate it using the formula. The formula works in the source table, but there seems to be a loop hole when returned through a Lookup field. Maybe it isn't possible in this unique instance to find a comma in a lookup field using SEARCH() or FIND()?
As a datapoint, @Mike_AutomaticN 's solution works for both FIND and SEARCH:
Link to base
@Mike_AutomaticN , I had thought of this. However, in this instance, it actually isn't an array but a single job title that contains a comma. This is why I was trying to isolate it using the formula. The formula works in the source table, but there seems to be a loop hole when returned through a Lookup field. Maybe it isn't possible in this unique instance to find a comma in a lookup field using SEARCH() or FIND()?
Hi,
Lookup is always array. Even when it has 1 or 0 elements. [1,2,3] or [1] or [] - are arrays.
Usually solution is quite simple, I use CONCATENATE({Field}) or ""&{Field}
I think ARRAYJOIN({Field}) should do the same
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.