Skip to main content

sortByColumnStrings

Sorts a table region by sorting a single column's values in alphabetical order.

To achieve the opposite effect, use sortByColumnStringsReverse instead.

Note

Available in "Describe the Table" and "Describe Row in Context" projects only.

Parameters

  • INPUT TABLE (table region)

    The table region to sort.

  • SORTING COLUMN (string)

    The column to sort by. Give the column name as a string.

    Note: The column must contain string values only.

Examples

Assume the following table data:

ID

Branch

Sales

Target

Row 1

1001

New York

478,745.37

500,000

Row 2

1002

Boston

329,493.49

300,000

Row 3

1003

Los Angeles

467,359.45

450,000

Row 4

1004

Chicago

463,603.17

400,000

Note

The first table column — ID in table above — contains the row names.

To sort the table by Branch in alphabetical order:

[[sortByColumnStrings(WholeTable,'Branch')]]

The result is this sorted table region:

 

Branch

Sales

Target

1002

Boston

329,493.49

300,000

1004

Chicago

463,603.17

400,000

1003

Los Angeles

467,359.45

450,000

1001

New York

478,745.37

500,000