Sorting in Nodes

The node attributes Sort field and Sorting can be used to sort the data in the destination tree. If there are several occurrences of a node and the sorting is used, the nodes will be sorted in ascending or descending order, according to the value of the sort field. The following figure shows an example of the effect of sorting. Node Position uses the sort field posnumber and the sorting mode ascending (2).


images/download/attachments/135168172/Mapping_31-version-1-modificationdate-1679979945622-api-v2.png


(1) Without sorting. The data is not sorted and simply read in as it is in the source data.

(2) The nodes Position are sorted with sort field posnumber in ascending order.


In order to allow the sorting to take place over several fields, it is possible to insert a calculation field within the node to be sorted. On the calculation field, you can use functions to combine other fields and the calculation field itself can then be used as the sort field.

It should be noted that the sorting depends on the data type of the sorting field. I. e., for data type String, fields are sorted lexically and for numeric data types, fields are sorted numerically. Example:


Sorting field of type String

10, 01, 02, 03, ...

Sorting field of type Integer

1, 2, 3, ..., 10


Attention: Sorting significantly impacts performance. Only use the sorting if absolutely necessary.

Note: Sorting is not case-sensitive.

Note: Sorting takes place only within a record and not across multiple records.

Note: The sort field must not use a template.