How can I configure a roll up column that refers to a column that is a link column that allows multiple values to only display unique values?

I am using a base to track orders. I have 3 tables: Orders, Orderlines, and Assets.

The Orderlines table has an Assets column that links to the Assets table, with the option to allow linking to multiple records. The Orders table has a rollup column Assets that refers to the Assets column in the orderlines table, and applies the ARRAYUNIQUE(values) function.

Given these rows in the Orderlines table, the corresponding row in the Orders table does NOT display unique assets:

  • Asset A; iPhone 8; USD 400
  • Asset B; iPhone Case; USD 30
  • Asset A, Asset B; Shipping; USD 12

The rollup column Assets in the Orders table has this value:

Asset A, Asset B, Asset A, Asset B

Using ARRAYJOIN(ARRAYUNIQUE(values)) illustrates the problem:

Asset A; Asset B; Asset A, Asset B

Notice that there THREE values that Airtable considers unique:

  • Asset A
  • Asset B
  • Asset A, Asset B

I thought that applying ARRAYFLATTEN(value) first would solve the problem:

ARRAYUNIQUE(ARRAYFLATTEN(value))

Unfortunately this does not seem to make any difference.

I hoped I could work around the problem by combining the 3 items into a string with ARRAYJOIN(values, ", ") and then splitting the resulting string back into an array of 4 items (splitting on ", ") that I can then apply ARRAYUNIQUE() to, but there doesn’t seem to be a function to split a string into an array.

I need the Assets column in the Orders table to contain this array:

  • Asset A
  • Asset B

Is that possible?

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.