DriveWorks Pro 15: TableSort [send feedback...]

TableSort

TableSort returns a table sorted on the given column.

Syntax

TableSort(Table or Table Name As Object, Column As Double, Has Headers As Boolean, Sort Ascending As Boolean) As Object

Where:

Table or Table Name is a Table array (such as the data in a standard table, or the result of a QueryDataValues function).

Column is the column on which to base the sort. Number starting at 1 for the first column.

Has Headers is TRUE will treat the first row as headers (therefore exclude from the sort). FALSE will sort the entire table (including the first row).

Sort Ascending is TRUE to to sort in ascending order, FALSE to sort in descending order.

Examples

RuleMeaning
ListAll(TableSort(DwTableName,2,FALSE), 3)Will list all data from the third column of the array returned by the SortTable function.


See also

How To: Work With Arrays

Table of Contents