Jul 29, 2020 08:13 AM
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?
Jul 29, 2020 03:05 PM
Use SUBSTITUTE(RIGHT(ARRAYJOIN(values), LEN(ARRAYJOIN(values)) - 14), ')', '')
Jul 30, 2020 10:08 AM
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.
Jul 30, 2020 12:29 PM
Indeed. Better use SUBSTITUTE(RIGHT(ARRAYJOIN(values), LEN(ARRAYJOIN(values)) - FIND('(', ARRAYJOIN(values))), ')', '')