MENU
    Using array functions in Airtable
    • 04 Dec 2023
    • 1 Minute to read
    • Dark
    • PDF

    Using array functions in Airtable

    • Dark
    • PDF

    Article summary

    An array is a combination of values that are typically separated by a comma. In Airtable, arrays can be used to produce this type of list when used in conjunction with a rollup or lookup field.

    Introduction

    Plan availability

    All plan types 

    Platform(s)

    Web/Browser, Mac app, and Windows app

    Related reading

    Rollup field array functions

    Function

    Description

    Examples

    ARRAYCOMPACT(values)

    Removes empty strings and null values from the array. Keeps "false" and strings that contain one or more blank characters.

    ARRAYCOMPACT(values)

    => [1, 2, false, 5] when values are [1, 2, false, null, 5]

    ARRAYFLATTEN(values)

    Flattens the array by removing any array nesting. All items become elements of a single array. Use when you have a lookup of a lookup for example.

    ARRAYFLATTEN(values)

    => [1, 2, 3, false] when values are [[1, 2, "", 3],[false]]

    ARRAYJOIN(values, separator)

    Join the array of rollup items into a string with a separator. Used when formulas can't be achieved on array data types and must be converted to a string first.

    ARRAYJOIN(values, "; ") 

    => 1; 2; 3 when values are [1, 2, 3]

    ARRAYUNIQUE(values)

    Returns only unique items in the array.

    ARRAYUNIQUE(values)

    => "[1, 2, 3]" when values are [1, 2, 3, 3, 2, 1]

    ARRAYSLICE(values, start,[end])

    Returns a subset of the array from the first index number—starting from 1. Optionally specify an end index to stop. Use negative numbers to begin to count from the end of the array.

    ARRAYSLICE(values, start,[end])

    ARRAYSLICE(values, 2, 3) => ["B", "C"] when values are ["A", "B", "C", "D"]

    To get the first item: ARRAYSLICE(values, 1, 1)

    To get the first two items: ARRAYSLICE(values, 1, 2)

    To get the last item: ARRAYSLICE(values, -1)

    To get the last two items: ARRAYSLICE(values, -2)


    Was this article helpful?