resort list()
This function resorts the values in list a. The sorting order is set with b.
The result value of the function is an empty string with set Empty Flag .
Depending on the type of the values in the list, the ordering will be done in the following way. Important note: The values in the list should all be of the same data type. Mixing values of different data types will lead to incorrect sorting results. Please also note that the data type of values inserted into lists is "String" if you use one of the "add to list" functions and write the inserted values directly into the parameter field of the function . To get another data type, you must specify another field from the source or target structure in the parameter field. The data type will then be that of the corresponding field. See also parameter c .
Type of values |
Type of ordering if done ascending |
Numeric values (Integer, etc.) |
Lower numbers before higher numbers. |
Date values (Date, Timestamp) |
Earlier times before later times. |
String |
'lexical sorting': Number before uppercase characters, uppercase characters before lowercase characters, do two texts start the same, the shorter text is before the longer text. |
Parameters
Parameter |
Description |
a |
(optional) Name of the list. Default: default. |
b |
(optional) desc if the sorting should take place in descending order. Default: asc |
c |
(optional) If true, a numerical sorting is forced. Default: false. |
Examples
The following lists are defined.
myIntList with values {10, 4, 20, 65}.
myDateList with values {2001-12-12, 2001-05-23, 2001-07-09}.
myStringList with values {Val123, Val12, val123, val12, 1val}.
Parameter a |
Parameter b |
Parameter c |
Values in list |
myIntList |
|
|
{4, 10, 20, 65} |
myIntList |
desc |
|
{65, 20, 10, 4} |
myDateList |
|
|
{2001-05-23, 2001-07-09, 2001-12-23} |
myDateList |
desc |
|
{2001-12-23, 2001-07-09, 2001-05-23} |
myStringList |
|
|
{1val, val12, val123, Val12, Val123} |
myStringList |
desc |
|
{Val123, Val12, val123, val12, 1val} |