Table window |
Columns menu |
Sort |
|
Sort the records of the table.
Dialog box options:
Record sequence: |
|
Domain / Record number: |
|
If the table uses a regular class or ID domain: select this option to sort on the domain of this table, i.e. return to the original order of the table. If the table uses system domain None: select this option to sort on record numbers, i.e. return to the original order of the table. |
Column: |
Select this option to sort the table on the contents of a column. Select a column from the list box; open the list box by clicking it. |
Sort order: |
|
Ascending: |
When sorting on a column: select this option to sort the class names, IDs, values or strings of the selected column in ascending order, i.e. from A to Z or from small values to large values. |
Descending: |
When sorting on a column: select this option to sort the class names, IDs, values or strings of the selected column in descending order, i.e. from Z to A or from large values to small values. |
The table will be sorted: the order of records probably changes.
If you sorted on a certain column:
Tip:
To sort on a column, you can also select a column by clicking a column header, then click the selection with the right mouse button, and choose Sort Ascending or Sort Descending from the context-sensitive menu.
Mind:
When sorting on the domain of the table or on a column of a table, and when the table or the column uses a class or ID domain:
the table will be sorted in ascending or descending order as expected.
For more information, see Domain Class/ID editor : functionality.
Sort settings are stored when you close the table.
Command line syntax:
If you like, you can also sort through the command line. Type on the command line of a table window:
sorton columnname [-sortorder=ascending|descending]
Example 1: to sort the table in ascending order on column MyValues, type either:
sorton myvalues
or
sorton myvalues -sortorder=ascending
Example 2: to sort the table in descending order on column MyValues, type:
sorton myvalues -sortorder=descending
Mind: These sorton expressions can only be used on the command line of a table window, thus not from the command line of the Main window and not in a script.
See also: