"sortOrig"

Returns to a particular table sort order.

Synopsis

1)

setValue(string shape, "sortOrig", [bool/dyn_bool ascending], string Name1 [, string Name2 ...]);

shape.sortOrig([bool ascending], string Name1 [, string Name2 ...]);

2)

setValue( string shape, "sortOrig", int dummy);

shape.sortOrig(int dummy);

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".

dummy Dummy parameter
Name1 Names of columns

Description

This attribute is used to return to a previously defined sort order. Two sorting scenarios are possible:

1. Sorts the table entries by the criteria used in the first sort ("sort", "sortDyn", "sortPart") after activating the specific panel or for the last "sortOrig" with string parameters. The "dummy" parameter does not mean anything, but must be added.

2. The function "sortOrig" with string parameters sorts in the same way as sort by the name of the columns indicated. However, in addition a new starting point is set for future "sortOrig" calls with dummy parameter, that is, a simple return to this sort order is possible.

Example

A sort order is set as the new starting point and later restored.

main()
{
  shape table=getShape("table123");
  // New "starting point"
  table.sortOrig("Surname", "First name");
  // Sort order could be changed here
  // Return to sort order
  table.sortOrig(0);
}

Assignment

Table