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
Oct 01, 2020 10:51 PM
Hi!
How do I individually concatenate fields if one of the fields is comma-separated?
For example, I want to take “red, blue” and concatenate this with “shoe” to come up with ““red shoe”,“blue shoe”” with the quotation marks instead of “red, blue shoe”.
Any ideas? Thank you in advance!
Solved! Go to Solution.
Oct 02, 2020 08:01 AM
Colors (linked records)
Blue, Red
Item (single line text)
Shoes
Item Colors (formula)
Blue Shoes, Red Shoes
Formula for Item Colors:
ARRAYJOIN(
{Colors},
{Item} & ", "
) & " " & {Item}
Note, array related formulas such as ARRAYJOIN are designed for linked records and related fields. They don’t currently support comma separated strings, for example.
Oct 02, 2020 08:01 AM
Colors (linked records)
Blue, Red
Item (single line text)
Shoes
Item Colors (formula)
Blue Shoes, Red Shoes
Formula for Item Colors:
ARRAYJOIN(
{Colors},
{Item} & ", "
) & " " & {Item}
Note, array related formulas such as ARRAYJOIN are designed for linked records and related fields. They don’t currently support comma separated strings, for example.
Oct 04, 2020 09:57 PM
Thanks, Zollie! I tried this with a standard Formula field and it didn’t quite work the way I wanted to - but it worked as expected when I used a Rollup field instead.
Oct 05, 2020 06:25 AM
Here’s another option that will work in a formula field:
SUBSTITUTE(Colors, ", ", " " & Item & ", " ) & " " & Item