Help

Removing spaces from an ARRAYUNIQUE Rollup

Solved
Jump to Solution
1929 2
cancel
Showing results for 
Search instead for 
Did you mean: 
M_CCC
4 - Data Explorer
4 - Data Explorer

I’m going crazy trying to figure out how to remove spaces from this ARRAYUNIQUE.

Here’s an example of what I’m getting in the rollup field:

  • “5f286eebbd491e7410167db7”, “5f286eebbd491ee230167eaf”, “5f286eebbd491e8175167e8f”

I’ve tried adding another formula field alongside this to substitute the spaces using this:

  • SUBSTITUTE({Rollup Field},", “,”,")

But it throws an ambiguous error.

Oddly, it seems like the ARRAYJOIN is working fine. That defaults to no space, and it seems like you can run the SUBSTITUTE formulas over them with no issue.

Are there any known differences with ARRAYUNIQUE? Any ideas on how I can strip the strings from it?

  • Current output: “5f286eebbd491e7410167db7”, “5f286eebbd491ee230167eaf”, “5f286eebbd491e8175167e8f”
  • Desired output: “5f286eebbd491e7410167db7”,“5f286eebbd491ee230167eaf”,“5f286eebbd491e8175167e8f”

Thanks

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community!

You can nest the ARRAYJOIN and ARRAYUNIQUE together:

ARRAYJOIN(ARRAYUNIQUE(values))

By the way, using lookup fields in formulas is tricky because they are array values, not strings or numbers. You can force a lookup value into a string by concatenating it with an empty string {lookup field} & "".

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community!

You can nest the ARRAYJOIN and ARRAYUNIQUE together:

ARRAYJOIN(ARRAYUNIQUE(values))

By the way, using lookup fields in formulas is tricky because they are array values, not strings or numbers. You can force a lookup value into a string by concatenating it with an empty string {lookup field} & "".

Incredible. Thank you so so much!

Fortunately, that nested version works within the rollup itself. Much appreciated!