SORTUPBY
Use SORTUPBY to sort the objects of a series based on a component that the objects contain.
The SORTUPBY function
returns the input series, sorted in ascending order by the value of the specified component.
- When the character set of the data is ASCII, the objects are sorted in ASCII ascending order.
- For all other character sets, the objects are sorted in binary ascending order.
The SORTUPBY function does not sort the output of the EXTRACT, REJECT, or UNIQUE functions.
- Syntax:
- SORTUPBY (series-item-expression, single-item-expression)
- Meaning:
- SORTUPBY (group_series_to_sort, group_component_to_sort_by)
- Returns:
- A series object
SORTUPBY returns a series of instances of a group, sorted in ascending order by the value of an item that the group contains.
Example
In this example, the group Soldier contains the items:
- Name
- Rank
- Serial number
SORTUPBY (Soldier:Army, Rank:Soldier:Army)
Related functions
- SEARCHDOWN
- SEARCHUP
- SORTUP
- SORTDOWN
- SORTDOWNBY