Sorts array values in the specified column, array literal, or function that returns an array in ascending or descending order.

Array literal reference example:

arraysort([A,B,C,D],descending)

Output: Returns the following array: [D,C,B,A]

Column reference example:

arraysort(myArrays,ascending)

Output: Returns the arrays listed in the myArrays column sorted in ascending order.

arraysort(array_ref,order_enum)


ArgumentRequired?Data TypeDescription
array_refYstringName of Array column, Array literal, or function returning an Array to apply to the function
order_enumYstring (enumerated value)

Order is defined as either:

  • ascending (default)
  • descending

array_ref

Name of the array column, array literal, or function returning an array whose array values you wish to sort.

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

order_enum

String literal indicating the order by which the referenced arrays should be sorted:

Usage Notes:

Required?
Data Type
Example Value
NoString (enumerated value)descending


Example - Student progress across tests