Help

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

1162 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Ambroise_Dhenai
8 - Airtable Astronomer
8 - Airtable Astronomer

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.
image
image

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

Any idea how to get the url only?

3 Replies 3
TFP
6 - Interface Innovator
6 - Interface Innovator

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

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.

TFP
6 - Interface Innovator
6 - Interface Innovator

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