Loading...
 

Sort

Sort

Sort(windowID, oboxID), Sort(, oboxID), Sort

parameters: Identifier of a Windows and an object box

Stack
Stack Position Description
Stack(In) Top -
Stack(Out) Top -

After a previous instruction SetSort all elements are displayed in the newly defined order.

Normally sorting is done within the current transaction. If no transaction is currently running, a read-write transaction is started and ended after sorting.
To avoid locking conflicts, a read-only transaction can be started instead. For this purpose, the environment variable CX_LISTVIEW_READONLY_TXN must be assigned a positive value. If a ListView has at least as many entries as the value specifies, a read-only transaction is started before sorting (if none is running yet). This corresponds to the command BeginTXN(READ). When a transaction for sorting is started, the sorting function also ends it.

ObjectCombobox(CX_ACCOUNTING_AREA::structurePointer, AUTO_POSITION, NULL_ELEMENT, 122, 16, 330, 70) [ INITIALIZE:               [ Path(CX_STRUCTURE::uniqueID) COLOR LIGHTRED ] SetFormat               [ Path(CX_STRUCTURE::mlShortName) COLOR LIGHTBLUE ] SetFormat               [ Path(CX_STRUCTURE::mlDescription) COLOR CYAN ] SetFormat               // Define the sorting               [ Path(uniqueID) ] SetSort // Or alternatively (by column index): [ 0 ] SetSort               // Now actually sort the list               Sort ]

If no sort is defined, Sort does not change the order of the elements. The following code therefore has no effect on the order of the elements in the list:

[ ] SetSort Sort

See also