Returns an array containing a slice of the input array, as determined by starting and ending index parameters.

Array literal reference example:

arrayslice(["A","B","C","D"],1,2)

Output: Returns the array: ["B"]. 

Column reference example:

arrayslice([myValues],2)

Output: Returns a slice of the arrays in the myValues column, starting at the third value and extending to the end of the array.

arrayslice(array_ref,int_start_index,[int_end_index])


ArgumentRequired?Data TypeDescription
array_refYarray or stringName of Array column, Array literal, or function returning an Array to apply to the function
int_start_indexYinteger0-based index value of the first element in the Array to include in the slice.
int_end_indexNinteger

0-based index "soft" value of the last element in the Array to include in the slice. Listed value is not included.

If no value is provided, the last element of the array is the end of the slice.

array_ref

Name of the array column, array literal, or function returning an array whose element you want to locate.

 

Required?Data TypeExample Value
YesString (column reference or function) or array literalmyArray1

int_start_index

Index of the starting element of the source array that you wish to include in the slice.

Required?Data TypeExample Value
YesInteger (whole number)4

int_end_index

Optional index of the ending element of the source array that you wish to include in the slice.

Required?Data TypeExample Value
YesInteger (whole number)10


Example - Podium Race Finishes