slice
Use the slice function to extract a portion of a collection, from the start index up to (but not including) the end index. If the end index is not specified, the collection is sliced to its end. Collections start at 0.
Function format
slice(Input Collection, Start Index, End Index)
-
Input Collection: The collection to extract a portion from.
-
Start Index: The index to start extracting from (inclusive).
-
End Index (Optional): The index to stop extracting at (exclusive). If omitted, extracts to the end of the collection.
slice example
In an Expenses Repeating section, use slice to extract the first three rows of the Amount column for a "recent expenses" preview, leaving the remaining rows out.
slice([120.50, 42.00, 89.99, 15.25, 200.00], 0, 3)
The formula returns the collection [120.50, 42.00, 89.99], the first three Expenses rows' amounts.