4D v14.3SORT LIST |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
SORT LIST
SORT LIST
The SORT LIST command sorts the list whose reference number is passed in list. To sort in ascending order, pass >. To sort in descending order, pass <. If you omit the sorting order parameter, SORT LIST sorts in ascending order by default. SORT LIST sorts all levels of the list; it first sorts the items of the list, then it sorts the items in each sublist (if any), and so on, through all the levels of the list. This is why you will usually apply SORT LIST to a list in a form. Sorting a sublist is of little interest because the order will be changed by a call to a higher level. SORT LIST does not change the current list item nor the current expanded/collapsed state of the list and sublists. However, because the current item can be moved by the sorting operation, Selected list items may return a different position before and after the sort. Given the list named hList, shown here in the Application environment: After the execution of this code: ` Sort the list and it sublists in ascending order The list looks like: After the execution of this code: ` Sort the list and it sublists in descending order The list looks like: |
PROPERTIES
Product: 4D
HISTORY
Created: 4D v6 SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v12.4) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||