Identity
The Identity category includes two types of Script Instructions.
Get Value of an Identity Property
User has Role
To know more about Identities, see Enterprise Identities.
Get Value of an Identity Property
is an Identity Instruction that retrieves the value of the selected Property of the selected Identity in the current user profile and stores it in a Local Variable.
To construct a Script Instruction using
Property:Select
from the Instruction dropdown list. Options and appear as seen below.Enter the name of a Local Variable in the
field. Enter the identity defined in the current user profile in the field. In the field, enter a JavaScript Expression that specifies the Property (of the entered Identity) that needs to be retrieved.The
Script Instruction is added to the Script.
User has Role
is an Identity Instruction that checks if the current user has a certain Role or not. For example, it can be used to check if the user belongs to an organization or not.
To construct a Script Instruction using
Property:Select
from the Instruction dropdown list. Options and appear as seen below.Enter the name of a Local Variable that holds the result in the
field. Select the Role to be checked in the dropdown list.In the below example:
At runtime, this Script Instruction checks if the user has the Role 'Admin'.
If the user has the Role Admin, a Boolean value TRUE is stored in the variable isAdmin.
If the user does not have the Role Admin, a Boolean value FALSE is stored in the variable isAdmin.
The
Script Instruction is added to the Script.