sort-list
Description
sort-list adaptor sorts values in a list.
Sorts a list by ascending or descending order. In ascending mode, numbers come first and then text (1,2,cow), in descending mode text comes first (cow,2,1). Use before or after remove-duplicate-list-values adaptor to get a sorted list without duplicates.
Inputs
list
Type: list
Required: Yes
The list to be sorted.
sort direction
Type: text
Required: No
Specifies the sort direction, should be either asc (for ascending order) or desc (for descending order).
Outputs
list
Type: list
A list containing the sorted values.
Examples
Example 1: Default behaviour.
Inputs:
list:
January
February
March
April
sort direction: null (empty)
Outputs:
list:
April
February
January
March
-> Sorted a list in ascending order.
Example 2: Sort list in descending order.
Inputs:
list:
January
February
March
April
sort direction: desc
Outputs:
list:
March
April
February
January
-> Sorted a list in ascending order.
Use case
Create an alphabetic reference of names.
Separate out text and numbers.
Last updated