User Guide

808 List component
Usage
listInstance.sortItemsBy(fieldName, optionsFlag)
listInstance.sortItemsBy(fieldName, order)
Parameters
fieldName A string that specifies the name of the field to use for sorting. This value is
usually
"label" or "data".
order A string that specifies whether to sort the items in ascending order ("ASC") or
descending order (
"DESC").
optionsFlag Lets you perform multiple sorts of different types on a single array without
having to replicate the entire array or resort it repeatedly.
The following are possible values for
optionsFlag:
Array.DESCENDING, which sorts from highest to lowest.
Array.CASEINSENSITIVE, which sorts without regard to case.
Array.NUMERIC, which sorts numerically if the two elements being compared are
numbers. If they arent numbers, use a string comparison (which can be case-insensitive if
that flag is specified).
Array.UNIQUESORT, which returns an error code (0) instead of a sorted array if two
objects in the array are identical or have identical sort fields.
Array.RETURNINDEXEDARRAY, which returns an integer index array that is the result of the
sort. For example, the following array would return the second line of code and the array
would remain unchanged:
["a", "d", "c", "b"]
[0, 3, 2, 1]
You can combine these options into one value. For example, the following code combines
options 3 and 1:
my_array.sort (Array.NUMERIC | Array.DESCENDING)
Returns
Nothing.