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:

  1. January

  2. February

  3. March

  4. April

sort direction: null (empty)

Outputs:

list:

  1. April

  2. February

  3. January

  4. March

-> Sorted a list in ascending order.

Example 2: Sort list in descending order.

Inputs:

list:

  1. January

  2. February

  3. March

  4. April

sort direction: desc

Outputs:

list:

  1. March

  2. April

  3. February

  4. January

-> Sorted a list in ascending order.

Use case

  • Create an alphabetic reference of names.

  • Separate out text and numbers.

Last updated