|
Field name
|
Format
|
|
First name
|
user.firstName
|
|
Last name
|
user.lastName
|
|
Primary email address
|
user.email
|
|
Full name
|
user.displayName
|
|
Any custom fields' information
|
user.<custom field>
Example: For a field named
Vehicle Number
, the format would be user.Vehicle Number.
|
|
String methods
|
Expression format
|
Description
|
Example
|
|
Concat
|
concat(<string>,<string_to_be_appended>)
|
Adds <string_to_be_appended> to the end of the <string>.
|
concat(user.firstName,user.Employee ID)
The value in the user's "Employee ID" field will be appended with the user's first name. If a user's first name is "Amelia" and employee ID is "7469," then the value will be "Amelia7469".
|
|
Index Of
|
indexOf(<string>,<character>)
|
Returns the position of the first instance of the given character in the <string>.
|
indexOf(user.firstName,"o")
Returns the position of the first instance of the character "o" within the user's first name. If a user's first name is "Johnson", then the position of the first occurrence of the character "o" will be returned, which is 1.
|
|
Replace
|
replaceAll(<string>,<string_to_be_removed>,<string_to_be_placed>)
|
Replaces all occurrences of <string_to_be_removed> in the <string> with <string_to_be_placed>.
|
replaceAll(user.firstName,"e","a")
All the occurrences of "e" will be replaced by "a". If a user's first name is "Ellen", then all occurrences of the character "e" in the name will be replaced by "a", giving "
Allan" as the output.
|
|
Replace First
|
replaceFirst(<string>,<string_to_be_removed>,<string_to_be_placed>)
|
Replaces the first occurrence of <string_to_be_removed> in the <string> with <string_to_be_placed>.
|
replaceFirst(user.firstName,"e","a")
The first occurrence of "e" will be replaced by "a". If a user's first name
is "Ellen", then the first occurrence of the character "e" in the name will be replaced by
"a", giving "Allen" as the output.
|
|
Substring
|
substring(<string>,<beginIndex>,<endIndex>)
|
Fetches the part of the <string> that is specified by the indexes.
|
substring(user.firstName,0,1)
The first and second characters from the user's first name will be fetched. If a user's first name is "John", then the string "Jo" will be returned.
|
|
To Lower Case
|
toLowerCase(<string>)
|
Converts all characters in the given string to lower case.
|
toLowerCase(user.firstName)
The characters in the user's first name will be converted to lower case. If a user's first name is "John", "john" will be returned.
|
|
To Upper Case
|
toUpperCase(<string>)
|
Converts all characters in the given string to upper case.
|
toUpperCase(user.firstName)
The characters in the user's first name will be converted to upper case. If a user's first name is "John", then "JOHN" will be returned.
|
|
Trim
|
trim(<string>)
|
Removes leading and trailing spaces in the given string. Can be used to sanitize fields that might have typos, or strings that were derived using other methods like substring.
|
trim(user.displayName)
The blank spaces, if any, will be removed. For example, if the full name of a user is " Johnson Doe", then the space before "Johnson" will be removed, and "Johnson Doe" will be returned.
|