Skip to main content

Get only the attachment.url value when using Rollup field to clone an Attachment field

  • July 29, 2020
  • 3 replies
  • 17 views

Forum|alt.badge.img+17

I want to clone a field from Entity 1 to entity 2, usually this is trivial.

But the field is an attachment field, “cmsLogo”.

When I use values, it “works” but shows a weird formatted string.

I tried other options such as values.1 and values[1] but no luck.

Any idea how to get the url only?

3 replies

Forum|alt.badge.img+3
  • Inspiring
  • 28 replies
  • July 29, 2020

Use SUBSTITUTE(RIGHT(ARRAYJOIN(values), LEN(ARRAYJOIN(values)) - 14), ')', '')


Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • July 30, 2020

That “weird formatted string” is what an attachment field passes to a formula, including the formula in a rollup field. The values reference used by a rollup does refer to the array of collected items, but the array can only be processed using Airtable’s built-in array functions. In this case you’re getting a one-item string array.

It should be noted that the formula that @TFP wrote will only work as long as the filenames themselves maintain that same length (8 characters for the name, plus “.png”). If the filename length ever varies from that, you’ll have to tweak the formula.


Forum|alt.badge.img+3
  • Inspiring
  • 28 replies
  • July 30, 2020

Indeed. Better use SUBSTITUTE(RIGHT(ARRAYJOIN(values), LEN(ARRAYJOIN(values)) - FIND('(', ARRAYJOIN(values))), ')', '')