Help

Re: Concatenate using multiple linked records

Solved
Jump to Solution
1741 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Justin_Lim
4 - Data Explorer
4 - Data Explorer

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!

1 Solution

Accepted Solutions
Zollie
10 - Mercury
10 - Mercury

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.

See Solution in Thread

4 Replies 4
Zollie
10 - Mercury
10 - Mercury

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.

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.

Here’s another option that will work in a formula field:

SUBSTITUTE(Colors, ", ", " " & Item & ", " ) & " " & Item

Screen Shot 2020-10-05 at 6.24.33 AM

This approach worked for me. But how would the formula change if the "item" column also takes more options?

To elaborate, I have two columns: Companies and Keywords. A have 'combined' formula column in the following format: "Company - Keyword". Sometimes, there is more than one company and more than one keyword. So the formula above doesn't always work. Below is an example of the formula's output in different scenarios. 

Motlaq_AlMutair_0-1684672440338.png

 

and here is the formula:

Motlaq_AlMutair_1-1684672458068.png