Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

ListSort

Use this function to sort a list in ascending or descending order.

Syntax:

ListSort(list, ASCENDING|DESCENDING)

where:

  • list is a variable of type NUM[], STRING[] or RANGE that contains the list to sort.
  • ASCENDING sorts the list in ascending alphabetical or numerical order.
  • DESCENDING sorts the list in descending alphabetical or numerical order.

Syntax example:

CREATE VARIABLE myList1[] AS STRING

CREATE VARIABLE myList2[] AS STRING

 

SET VARIABLE myList1 = "jan|feb|mar"

 

Set VARIABLE myList2 = ListSort(myList1, ASCENDING)

// In this example, myList2 equals feb|jan|mar.

Published:

ListSort

Use this function to sort a list in ascending or descending order.

Syntax:

ListSort(list, ASCENDING|DESCENDING)

where:

  • list is a variable of type NUM[], STRING[] or RANGE that contains the list to sort.
  • ASCENDING sorts the list in ascending alphabetical or numerical order.
  • DESCENDING sorts the list in descending alphabetical or numerical order.

Syntax example:

CREATE VARIABLE myList1[] AS STRING

CREATE VARIABLE myList2[] AS STRING

 

SET VARIABLE myList1 = "jan|feb|mar"

 

Set VARIABLE myList2 = ListSort(myList1, ASCENDING)

// In this example, myList2 equals feb|jan|mar.

For an optimal Community experience, Please view on Desktop