Skip to main content
Solved

Formula creates a comma when using arrayjoin

  • April 29, 2021
  • 3 replies
  • 44 views

Forum|alt.badge.img+4

Hi community!
I have a very strange issue here…
I have a lot of duplicates within the same field, a lookup field (I’m not so sure why, but that’s for a different question)
In order to try to create a field with no duplicates, I created another field with the formula:
(ARRAYJOIN({Most recent First Name :zap: },", "))
It works fine for most of the records, but in some it creates a a comma in front of the name, which I couldn’t get rid of. It happens only in some of the records, and only those that are not duplicated to begin with
For the full picture, the next step is a field that takes the string that I created and find the name to the left of the comma which gives me just the name.
Any idea what is it that I’m doing wrong?
Thanks!

Best answer by kuovonne

Welcome to the Airtable community!

Could there be a linked record that has no value in the looked-up field?

Try using a rollup field (instead of the lookup & formula field) based on the same field as the lookup, with the ARRAYCOMPACT function

ARRAYJOIN(ARRAYCOMPACT(values),", ")

3 replies

Forum|alt.badge.img+4
  • Author
  • New Participant
  • April 29, 2021

Here is a screenshot of the base


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • April 29, 2021

Welcome to the Airtable community!

Could there be a linked record that has no value in the looked-up field?

Try using a rollup field (instead of the lookup & formula field) based on the same field as the lookup, with the ARRAYCOMPACT function

ARRAYJOIN(ARRAYCOMPACT(values),", ")

Forum|alt.badge.img+4
  • Author
  • New Participant
  • April 29, 2021

Welcome to the Airtable community!

Could there be a linked record that has no value in the looked-up field?

Try using a rollup field (instead of the lookup & formula field) based on the same field as the lookup, with the ARRAYCOMPACT function

ARRAYJOIN(ARRAYCOMPACT(values),", ")

I don’t know what magic you did here, but it worked!
Thanks so so much!