Skip to main content

Celonis Product Documentation

USER_NAME
Description

Returns the celonis username of the current user.

Syntax
 USER_NAME()

[1]

This example shows the output of the USER_NAME function executed by the user test.user@example.com:

Query

Column1

         USER_NAME ( )
        

Input

Output

Result

Column1 : string

'test.user@example.com'

[2]

In this example, only the user permitted.user@example.com is allowed to see the value column of the example table. All other users will only see NULL values in this column. This example shows the output when it is executed by the user test.user@example.com, who is not allowed to see the value column.

Please note that this solution should not be used to prevent users from seeing highly confidential data, as the query can be modified accordingly. To securely hide full rows for specific users or user groups, Data Permissions should be used. Search for Data Permissions on this help page for more information.

Query

Column1

         "CaseTable"."companyCode"
        

Column2

         CASE WHEN USER_NAME ( ) = 'permitted.user@example.com' THEN "CaseTable"."value" ELSE NULL END
        

Input

Output

CaseTable

caseId : int

companyCode : string

value : int

1

'001'

600

2

'001'

400

3

'001'

200

4

'002'

300

5

'002'

300

6

'003'

200

Result

Column1 : string

Column2

'001'

null

'001'

null

'001'

null

'002'

null

'002'

null

'003'

null