Skip to main content

Celonis Product Documentation

SORTING_COLUMN
Description

SORTING_COLUMN allows to refer the sorting column of an activity table in the data model without using the exact column name.

Syntax
 SORTING_COLUMN ( [ expression ] )
  • When an expression that involves a column of an activity table is passed as an argument, the sorting column of that activity table is referenced.

  • When no argument is passed, the sorting column of the default activity table is referenced.

  • When a table reference is passed as an argument, the sorting column of that activity table is referenced.

Examples

[1]

In this example, the data model contains one activity table. Using a column reference as the input expression, we refer to the SORTING column of the related activity table:

Query

Column1

         SORTING_COLUMN ( "Activities"."TIMESTAMP" )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

SORTING : int

'1'

'A'

Wed Jan 01 2020 00:00:00.000

3

'1'

'B'

Thu Jan 02 2020 00:00:00.000

5

'2'

'A'

Wed Jan 01 2020 00:00:00.000

9

'2'

'C'

Thu Jan 02 2020 00:00:00.000

99

'3'

'D'

Wed Jan 01 2020 00:00:00.000

23

Result

Column1 : int

3

5

9

99

23

[2]

In this example, the data model contains one activity table. Using a table reference as the input expression, we refer to the SORTING column of the related activity table:

Query

Column1

         SORTING_COLUMN ( "Activities" )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

SORTING : int

'1'

'A'

Wed Jan 01 2020 00:00:00.000

3

'1'

'B'

Thu Jan 02 2020 00:00:00.000

5

'2'

'A'

Wed Jan 01 2020 00:00:00.000

9

'2'

'C'

Thu Jan 02 2020 00:00:00.000

99

'3'

'D'

Wed Jan 01 2020 00:00:00.000

23

Result

Column1 : int

3

5

9

99

23