Skip to main content
Solved

Commas separating items in array lost

  • January 31, 2022
  • 4 replies
  • 111 views

Michael_Benson
Forum|alt.badge.img+9

Hi there,

I have a rollup field - Field A - which displays items in an array using a comma separator. I retrieve the items using ARRAYUNIQUE(values).

When I try and call this field in another field - Field B, this formula keeps the comma separator:

{Field A}
Produces: 1, 2, 3

When I try and add text to the formula, the commas are lost and the values aren’t separated but bunch into one long block of text:

{Field A) & " Text"
Produces: 123 Text

Would anyone be able to help? How can I add the commas/separators back in between these values?

Best answer by ScottWorld

Try this:

ARRAYJOIN({Field A},", ") & " Text"

There are probably other ways of handling this too, but that should work.

4 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • Answer
  • January 31, 2022

Try this:

ARRAYJOIN({Field A},", ") & " Text"

There are probably other ways of handling this too, but that should work.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • February 1, 2022

Or convert the formula in the rollup field to

ARRAYJOIN(ARRAYUNIQUE(values), ", ")

In either case, you need to use ARRAYJOIN.


Michael_Benson
Forum|alt.badge.img+9
  • Author
  • Participating Frequently
  • February 1, 2022

Try this:

ARRAYJOIN({Field A},", ") & " Text"

There are probably other ways of handling this too, but that should work.


Thanks both!

I’ve opted for Scott’s approach as I still need to be able to count items in the array.

I didn’t realise we could use ARRAYJOIN outside of a Rollup field. The documentation seems a little unclear: https://support.airtable.com/hc/en-us/articles/360052869513-Array-functions

Cheers


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • February 1, 2022

Thanks both!

I’ve opted for Scott’s approach as I still need to be able to count items in the array.

I didn’t realise we could use ARRAYJOIN outside of a Rollup field. The documentation seems a little unclear: https://support.airtable.com/hc/en-us/articles/360052869513-Array-functions

Cheers


Yeah, they have errors in their documentation for many different functions. Glad you got it working!