Loading...
 

SetSort

SetSort

SetSort(windowID, oboxID), SetSort(, oboxID), SetSort

parameters: Identifier of a Windows and an object box

Stack
Stack Position Description
Stack(In) Top ]
Top 1 Column access expression / index | Path
. . . . . .
Top-n Column access expression / index | Path
Top n-1 [
Stack(Out) -

or, if you want to sort by one column only:

Stack
Stack Description
Stack(In) Column access expression /column index | Path
Stack(Out) -

SetSort determines the columns by which the data displayed in an ObjectBox is sorted. The complete access expression of the column without class filter is specified. If a path literal is passed then the class filter is ignored. A descending sorting is achieved by the DESCENDING flag, which must be placed without inverted commas after the column access expression.
SetSort determines the sort order for a following FillObox, UpdateObox or OboxFill, OboxUpdate statement. Already displayed data can be rearranged with Sort (see example).
For structured data, sorting is only applied to objects (childs) that are located under the same parent object. Any set of subordinate objects to a (common) parent object are therefore treated as a kind of sub-list.

Example

// The list will be sorted by: 1st. descending date, then ascending uniqueID

[ "date" DESCENDING "uniqueID" ] SetSort Sort

See also