2019.2

Table Of Contents
Sort(const String Name,
optional TSortFlags Flags,
optional const String Name2,
optional TSortFlags Flags2,
optional const String Name3,
optional TSortFlags Flags3)
Not available in MetaJob
Sorts the sub-nodes contained in the node according to a number of sort criteria. Unselected
sub-nodes will be placed at the end, after all the selected sub-nodes, in the order in which they
were placed prior to the sort.
Each of the three sort criteria can be modified by specifying one or more flags.
Value Meaning
1 The name refers to an Attribute rather than a field.
2 The sort is done in descending order (i.e. the highest to the lowest).
4 The field is an integer numeric value.
Note
In an Active Script environment, such as the Run Script task, you must work with the numerical
values.
In environments where the flags are defined, you may instead use sfAttribute (= 1), sfDescending (=
2), and sfNumeric (= 4).
All the parameters to this method except for the first one are optional. If a Name is specified, it
must be valid for every sub-node. If, for example, the specified field is not found in a sub-node,
or a numeric sort is performed and one of the values is not numeric (i.e. consists of only decimal
characters, no thousand or decimal separator allowed), the method will fail.
If a sub-node contains multiple occurrences of fields with the specified name, only the first
occurrence will be considered.
Page 232