$GETROLE (get role of user)
$GETROLE reads a list of user roles currently executing asset management jobs in operation windows into the specified array.
Syntax
$GETROLE(array-name)
Values
-
array-name
Specifies the variable name of an array.
Status
The following table lists and describes the possible statuses:
Status |
Description |
---|---|
NORMAL |
Normal end |
NODATA |
— |
ERROR |
— |
Script execution interrupted |
Indicates one of the following:
|
Remarks
If no roles have been set for users, the process ends normally, but no information is set into the array variable.
Example
The following example acquires user roles, then outputs the role (administrator) in array number 1:
[SET_VALUE] $GETROLE(ARY) VAL = $GETARRAY(ARY, 1) MSG = 'ROLE = ' + VAL $ECHO(MSG)
- Execution result:
-
ROLE = administrator