Description
The getUserName
function returns the name of the current user. This function can only be used within an interactive context, such as a button or workflow process.
Syntax
getUserName()
Arguments
The getUserName
function does not require any arguments.
Return Types
The function returns the full name of the current user as text (string
).
Examples
Description | Formula | Result |
---|---|---|
Simple retrieval of the user name |
getUserName() |
Max Mustermann |
Usage within a button to greet the user |
createButton( 1, "Say Hello", "Click to greet the user", " Process( SetProcessMessage('Hello '+getUserName()+'!', 'smile') ) " ) |
Popup: "Hello Max Mustermann!" |
Notes
- This function only works in interactive contexts such as a button or workflow process.
- The
SetProcessMessage
&getUserName
functions must be used within aProcess()
function to work correctly. Otherwise, an error such as"Can not execute async functions outside async context"
will be displayed. - The returned name corresponds to the currently logged-in user in the application.
Comments
0 comments
Please sign in to leave a comment.