2022.2

Table Of Contents
SelectedPageCount()
MetaJob, MetaGroup and MetaDocument only
Returns the number of pages under the current node that are set to be part of the output, i.e. that have
their Selected property set to true, as well as all of their parents.
Returns:
The number of such nodes, if any. If the current node is not selected or one of its parents is not, it
returns 0.
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.
String comparisons are done without regards to the case (case-insensitive) using the Windows Win32
API function CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, ...).
Page 183