"sortPart"

Sorts a section in the table.

Synopsis

setValue(string shape, "sortPart", [bool/dyn_bool ascending],int n, int m, string Name1 [, string Name2 ...]);

shape.sortPart([bool ascending], int n, int m, string Name1 [, string Name2 ...]);

Parameters

Parameter Description
shape Name of the object
ascending

TRUE = Sort ascending

FALSE = Sort descending

You can also sort by multiple columns each in ascending or descending order. For this, use the dyn_bool parameter. For an example, see "sort".

n Upper limit of the section to be sorted (index starts at 0)
m Lower limit of the section to be sorted (index starts at 0)
Name1 Names of columns to be sorted

Description

The table is sorted in the same way as "sort" but only between lines n and m. The criteria are the column names passed in "Name".

The number of the final line must be greater than or equal to the number of the first line of the section to be sorted (m>=n).

Example

main()
{
  TABLE1.sortPart(12, 25, "Surname", "First name");
}

Assignment

Table