Help

TRIM formula for LOOKUP fields

Topic Labels: Formulas
Solved
Jump to Solution
1706 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Fliess
4 - Data Explorer
4 - Data Explorer

Hi Airtable Community,

When applying the TRIM function to fields that are lookup fields from another table I receive an error. However when testing other formula’s E.g. Concatenate that does work this particular situation using Linked/lookup fields from another table. I would assume that the all functions gather data in the back-end in the same way. Can one confirm this is actually not possible to use TRIM in combination with Lookup Field type?
Thank you

1 Solution

Accepted Solutions
augmented
10 - Mercury
10 - Mercury

Hi Michael. I just tried it and got an error like you. Then, I concatenated an empty string onto the end of the lookup, to give the TRIM function a string (assuming Airtable returns string after the “&” operator).

It works. So give it a try.

See Solution in Thread

4 Replies 4
augmented
10 - Mercury
10 - Mercury

Hi Michael. I just tried it and got an error like you. Then, I concatenated an empty string onto the end of the lookup, to give the TRIM function a string (assuming Airtable returns string after the “&” operator).

It works. So give it a try.

Thank you so much. Odd this is the solutions but adding &"" does the job.
Have a great day.
Thank you

Welcome to the Airtable community.

You are seeing this behavior because the TRIM function requires a string as an input, but an lookup field is an array.

There are multiple methods for converting an array into a string. The CONCATENATE function is one method. Concatenating the lookup with an empty string with & "" also converts the array to a string. Yet another option is to use a rollup field instead of a lookup field.

Hello @Kuavonne,

I'm new to Airtable and particularly to the subject of formulas and functions

Thank you for sharing. Is it possible to have . is it to add an example for better understanding