Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Aug 25, 2023 09:14 AM
Saw a new ARRAYSLICE function pop up in auto-complete today that isn't in the documentation. Anyone know where it came from? I suppose it allows for a less hack-y way to access individual items in a rollup, but I'm not sure what it provides in isolation, since you would need to know the index of the item you're looking for, unless you're looking for the last item in a rollup.
Sep 05, 2023 05:09 PM
Wow, a new function
I used it right away.
I would also like to have a function to get the length of an array.
<Last unique value>
ARRAYSLICE(ARRAYUNIQUE(ARRAYCOMPACT(values)), LEN(REGEX_REPLACE(ARRAYJOIN(ARRAYUNIQUE(ARRAYCOMPACT(values)),", "),"[^,]+(, )?","@")))
<Last value>
ARRAYSLICE(ARRAYCOMPACT(values)), LEN(REGEX_REPLACE(ARRAYJOIN(ARRAYCOMPACT(values),", "),"[^,]+(, )?","@")))
Sep 21, 2023 08:49 PM
I see the HELP has been updated.
Array Functions in Airtable | Airtable Support
-1 value can be used, so the previous formulas were not necessary.
<Last unique value>
ARRAYSLICE(ARRAYUNIQUE(ARRAYCOMPACT(values)),-1)
<Last value>
ARRAYSLICE(ARRAYCOMPACT(values)), -1)
I wonder if multi-select and lookups as well as link tables could be array type.
Jan 23, 2024 06:43 AM
Comparing linked record fields is now possible. See here
Jan 26, 2024 12:47 PM
This was a very welcome surprise. I just used it to drive an automation that takes a record with multiple linked records, and "splits" it into multiple records each with a single linked record.
{Linked Record Field} gets replaced with the contents of {Linked Record Field[0]} and a new record is created where {Linked Record Field} is {Linked Record Field[1:]} from the original record. The automation triggers recursively until the last record is created where {Linked Record Field[1:]} is empty.
I was about to do something kludgier which relied on finding commas (after first substituting them out of record names). It's nice to *kind of* have a way to index linked records.
Still annoying that I need an trivial, intermediate formula field to turn the linked record field into an array.
Feb 07, 2024 11:01 AM
I noticed that when you use ARRAYSLICE on an array of Attachments (Images) the output is not formatted as an image, but rather a string with the name of the image and its URL. Any way to get it to show the image?
Feb 07, 2024 11:16 AM
The output of the function is always a string, so unfortunately no in the absence of a field that takes a URL and shows a preview (it's been requested since the early days of Airtable, so it's unlikely to be implemented any time soon).