Operators are used to manipulate or compare values. You can do basic Math, Value Comparisons, and conditional flow control with "if" and "case" statements. You can combine operations and compare with Boolean operators.
Purpose: The following can be used to perform calculations of numeric values or combine string-based values.
Syntax:
+ : Add numbers or concatenate strings
− : Subtract numbers
* : Multiply numbers
∕ : Divide numbers
Note: Spaces are needed between symbols and values.
Example 1: S.FirstName + S.SN
Example 2: S.GivenName + "." + S.LastName
Example 3: 12 = 5 + 7
Purpose: The following operators return True or False when comparing values.
Syntax:
= : Are two values are equal?
> : Is the left value greater than the right value?
>= : Is the left value greater than or equal to the right value?
< : Is the left value is less than the right value?
<= : Is the left value less than or equal to the right value?
!= : Is the left value not equal to the right value?
Note: Spaces are needed between symbols and values.
Example : if(length(S.GivenName) > 10, S.GivenName, S.sn)
Purpose: Combinations of operations can be achieved with the following.
Syntax:
And
Or
! (not)
Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)
Purpose: Returns pure values for Boolean logic.
Syntax:
True
False
Null (empty)
Example: You want to set the target DisplayName to the source value only if it is Null
if(T.DisplayName = Null, S.DisplayName, T.DisplayName)
Purpose: Branching logic flow statement, evaluates different statements based on a given conditions, evaluated in order.
Syntax: case(condition, value, condition, value, ...)
Example: You want to set the department attribute to a standard, but the source value does not match your new standard. Departments in the source may be "IT" and "FIN", but in the target they need to be "Info Tech" and "Finance". Use of the case statement below will set department to "Info Tech" when the source department equals "IT" and set the department to "Finance" when the source department equals "FIN".
Target Attribute : Department
Value : case(S.Department = "IT","Info Tech", S.Department = "FIN","Finance")
Condition : Null
Purpose: Returns a specified value if given condition is true, otherwise returns a different specified value.
Syntax: if(condition, value1, value2)
returns value1 when condition evaluates to True, otherwise returns value2
Example: You need to set your display name to include (MGR), but only if the title of the user contains (Manager). For non-managers, display name is simply first name and last name. The value expression below uses an If statement to check if the source attribute title contains the word "Manager". If it contains "Manager", it will append " (MGR)" to the end of the first and last names.
Target Attribute : DisplayName
Value : if(contains(s.title, "Manager"), s.firstName+s.lastName + " (MGR)", s.firstName + s.lastName)
Condition : Null
Operators are used to manipulate or compare values. You can do basic Math, Value Comparisons, and conditional flow control with "if" and "case" statements. You can combine operations and compare with Boolean operators.
Purpose: The following can be used to perform calculations of numeric values or combine string-based values.
Syntax:
+ : Add numbers or concatenate strings
− : Subtract numbers
* : Multiply numbers
∕ : Divide numbers
Note: Spaces are needed between symbols and values.
Example 1: S.FirstName + S.SN
Example 2: S.GivenName + "." + S.LastName
Example 3: 12 = 5 + 7
Purpose: The following operators return True or False when comparing values.
Syntax:
= : Are two values are equal?
> : Is the left value greater than the right value?
>= : Is the left value greater than or equal to the right value?
< : Is the left value is less than the right value?
<= : Is the left value less than or equal to the right value?
!= : Is the left value not equal to the right value?
Note: Spaces are needed between symbols and values.
Example : if(length(S.GivenName) > 10, S.GivenName, S.sn)
Purpose: Combinations of operations can be achieved with the following.
Syntax:
And
Or
! (not)
Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)
Purpose: Returns pure values for Boolean logic.
Syntax:
True
False
Null (empty)
Example: You want to set the target DisplayName to the source value only if it is Null
if(T.DisplayName = Null, S.DisplayName, T.DisplayName)
Purpose: Branching logic flow statement, evaluates different statements based on a given conditions, evaluated in order.
Syntax: case(condition, value, condition, value, ...)
Example: You want to set the department attribute to a standard, but the source value does not match your new standard. Departments in the source may be "IT" and "FIN", but in the target they need to be "Info Tech" and "Finance". Use of the case statement below will set department to "Info Tech" when the source department equals "IT" and set the department to "Finance" when the source department equals "FIN".
Target Attribute : Department
Value : case(S.Department = "IT","Info Tech", S.Department = "FIN","Finance")
Condition : Null
Purpose: Returns a specified value if given condition is true, otherwise returns a different specified value.
Syntax: if(condition, value1, value2)
returns value1 when condition evaluates to True, otherwise returns value2
Example: You need to set your display name to include (MGR), but only if the title of the user contains (Manager). For non-managers, display name is simply first name and last name. The value expression below uses an If statement to check if the source attribute title contains the word "Manager". If it contains "Manager", it will append " (MGR)" to the end of the first and last names.
Target Attribute : DisplayName
Value : if(contains(s.title, "Manager"), s.firstName+s.lastName + " (MGR)", s.firstName + s.lastName)
Condition : Null
Operators are used to manipulate or compare values. You can do basic Math, Value Comparisons, and conditional flow control with "if" and "case" statements. You can combine operations and compare with Boolean operators.
Purpose: The following can be used to perform calculations of numeric values or combine string-based values.
Syntax:
+ : Add numbers or concatenate strings
− : Subtract numbers
* : Multiply numbers
∕ : Divide numbers
Note: Spaces are needed between symbols and values.
Example 1: S.FirstName + S.SN
Example 2: S.GivenName + "." + S.LastName
Example 3: 12 = 5 + 7
Purpose: The following operators return True or False when comparing values.
Syntax:
= : Are two values are equal?
> : Is the left value greater than the right value?
>= : Is the left value greater than or equal to the right value?
< : Is the left value is less than the right value?
<= : Is the left value less than or equal to the right value?
!= : Is the left value not equal to the right value?
Note: Spaces are needed between symbols and values.
Example : if(length(S.GivenName) > 10, S.GivenName, S.sn)
Purpose: Combinations of operations can be achieved with the following.
Syntax:
And
Or
! (not)
Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)
Purpose: Returns pure values for Boolean logic.
Syntax:
True
False
Null (empty)
Example: You want to set the target DisplayName to the source value only if it is Null
if(T.DisplayName = Null, S.DisplayName, T.DisplayName)
Purpose: Branching logic flow statement, evaluates different statements based on a given conditions, evaluated in order.
Syntax: case(condition, value, condition, value, ...)
Example: You want to set the department attribute to a standard, but the source value does not match your new standard. Departments in the source may be "IT" and "FIN", but in the target they need to be "Info Tech" and "Finance". Use of the case statement below will set department to "Info Tech" when the source department equals "IT" and set the department to "Finance" when the source department equals "FIN".
Target Attribute : Department
Value : case(S.Department = "IT","Info Tech", S.Department = "FIN","Finance")
Condition : Null
Purpose: Returns a specified value if given condition is true, otherwise returns a different specified value.
Syntax: if(condition, value1, value2)
returns value1 when condition evaluates to True, otherwise returns value2
Example: You need to set your display name to include (MGR), but only if the title of the user contains (Manager). For non-managers, display name is simply first name and last name. The value expression below uses an If statement to check if the source attribute title contains the word "Manager". If it contains "Manager", it will append " (MGR)" to the end of the first and last names.
Target Attribute : DisplayName
Value : if(contains(s.title, "Manager"), s.firstName+s.lastName + " (MGR)", s.firstName + s.lastName)
Condition : Null
Text Operations are functions used to manipulate or build text values. In some cases, such as the contains() and empty() operations, the text operation can be used to check for the presence of a given value.
Purpose: This method checks if a value is empty. Returns True if the given expression evaluates to either Null or an empty string ("")
Syntax: empty(value)
Example: The following will set the Company attribute to "BlueFish Hotels" if the Source company field is empty string or Null.
Target Attribute : Company
Value : "BlueFish Hotels"
Condition : empty(S.Company)
Purpose: This method checks if the given string value exists anywhere within the given string source. Returns True if value is found in source and False otherwise.
Syntax: contains(source, value)
NOTE: Does not work with list or multivalued attributes.
Example: You want to set ExtensionAttribute10 to "No Sync", but only if the source Company field contains "BlueFish".
Target Attribute : ExtensionAttribute10
Value : "No Sync"
Condition : contains(S.Company, "BlueFish")
Purpose: This method evaluates whether the given string value is a suffix of the given string source. Returns True if source ends with value and False otherwise.
Syntax: ends(source, value)
Example: You are rebranding and need to change values in the target based on values in the source attribute Company. The following example will set the target Company attribute to "BlueFish Motels" if the source Company field ends with "Hotels"
Target Attribute : Company
Value : "BlueFish Motels"
Condition : ends(S.Company, "Hotels")
Purpose: This method returns the length in characters of a given string value
Syntax: length(value)
Example: The standard for email alias is firstName.lastName unless that would exceed 10 characters. When it exceeds 10 characters only use the first initial and 8 characters from the last name. The following expression will check if the combination of source firstName and lastName is less than 10 characters in length. If so (length is less than 10) the value will be set to firstName.lastName. However, if the combination would contain more than 10 characters, the value will be set to firstInitial.lastName with the last name limited to the first 8 characters.
Target Attribute : Alias
Value : if(length(s.firstName + s.lastName) < 10, s.firstname+"."+ s.lastname, trunc(s.firstName, 1) + "." + trunc(s.lastName, 8))
Condition : Null
Purpose: This method is used to convert all characters of a given string value to remove capitalization. This can be helpful prior to comparisons as well as in other situations which require lowercase wording. The return value is a new string containing the lowercase string.
Syntax: lower(value)
Example: The customer wants the target DisplayName to be all in lowercase.
Target Attribute : DisplayName
Value : lower(S.DisplayName)
Condition : Null
Purpose: This method swaps all instances of one target string within a search string with a replacement string. Returns a new string created from given input string source with all instances of string value exchanged for instances of string replacement. If string source does not contain any instances of string value, the result will be the same as source. Note, the resulting string may be longer or shorter than the source string.
Syntax: replace(source, value, replacement)
Example: The following expression will replace part of the old company name with the new one. The goal is to replace "RedFish" in the source Company attribute with "BlueFish" in the target. If the source is "RedFishHotels" the new value in the target will be "BlueFishHotels".
Target Attribute : Company
Value : replace(S.Company, "RedFish", "BlueFish")
Condition : Null
Purpose: This method evaluates whether the given string value is a prefix of the given string source. Returns True if source begins with value and False otherwise.
Syntax: starts(source, value)
Example: The following will set CustomAttribute10 to "NA" if the source Location attribute begins with "United States"
Target Attribute : CustomAttribute10
Value : "NA"
Condition : starts(S.Location, "United States")
Purpose: This method removes leading and trailing spaces from given string value. Note that this does not remove other whitespace characters besides space. The return value is a copy of the input string value with no leading or trailing spaces.
Syntax: trim(value)
Example: "BlueFishHotels" becomes "BlueFishHotels"
Target Attribute : Company
Value : trim(S.Company)
Condition : Null
Purpose: This method returns a string which contains only the given length number of characters starting from the beginning of the given string source. Note, if length is greater than the length of string source, the result will be identical to string source.
Syntax: trunc(source, length)
Example: You want to use firstName and lastName to build the sAMAccountName but are limited to 20 characters.
Target Attribute : sAMAccountName
Value : trunc(S.givenName+S.sn, 20)
Condition : Null
Purpose: This method is used to convert the characters of a given string value to all capital letters. This can be helpful prior to comparisons as well as in other situations which require uppercase wording. The return value is a new string containing the uppercase string.
Syntax: upper(value)
Example: The customer wants the target DisplayName to be all in uppercase.
Target Attribute : DisplayName
Value : upper(S.DisplayName)
Condition : Null
Purpose: This method returns the location of the beginning of the first instance of given string value within given string source. The position begins counting from 1 for the first character. Returns -1 if no instance of string value is found in string source.
Syntax: index(source, value)
Example: You need to use the left part of the UPN as the DisplayName in a new environment. The following expression will find the location in the UPN string of the ‘@’ and then take all characters to the left of that.
Target Attribute : DisplayName
Value : trunc(S.userPrincipalName, index(S.userPrincipalName, "@") - 1)
Condition : Null
Purpose: The prefix function will add the prefix specified to the value specified ONLY if that value is NOT null or an empty string.
Syntax: prefix(value,prefix)
Example:
Target Attribute : used in combination with other functions to create a proxyaddress
Value : prefix(Result("mail"), "SMTP:")
Condition : Null
Purpose: The Suffix function will add the suffix text specified to the value specified ONLY if that value is NOT null or an empty string. This can be used to append to a DisplayName
Syntax: suffix(value, suffix)
Example:
Target Attribute : DisplayName
Value : suffix(S.DisplayName, "(MGR)")
Condition : Null
Purpose: The Right function will return characters from the end of the string.
Syntax: right(Source, Count)
Source - Value to operate on
Count - Number of characters from the end of the string to return. If Count is longer than the string, the entire string is returned.
Example: You want to return the last four characters from the source display name.
Target Attribute : DisplayName
Value : right(S.DisplayName, 4)
Condition : Null
Purpose: The Left function will return characters from the beginning of the string.
Syntax: left(Source, Count)
Source - Value to operate on
Count - Number of characters from the beginning of the string to return. If Count is longer than the string, the entire string is returned.
Example: You want to return the first four characters from the source display name.
Target Attribute : DisplayName
Value : left(S.DisplayName, 4)
Condition : Null
Purpose: The Substring function will return a subset of characters from a string.
Syntax: substring(Source, StartIndex, Length)
Source - (Required) Value to operate on
StartIndex - (Required) Zero based Start Index position (First character = 0)
Length - (Optional) Number of characters from Start Index to return. If StartIndex + Length extends beyond the string, Length is ignored, and the rest of the string is returned instead.
Example: You want to return the 4th through 9th characters from the source display name.
Target Attribute : DisplayName
Value : substring(S.DisplayName, 3, 5)
Condition : Null
Purpose: This method is used to create list of values to write to a multi-target attribute.
Syntax: GetList(Value1, Value2,…)
Example: The following expression will directly populate ShowInAddressBook values with custom address book lists instead of using the target environment’s Exchange Default address list.
Value: GetList("CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com","CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com")
Purpose: This method is used to update/replace an existing value in a multi-value attribute.
Syntax: UpdateList(S.ListAttribute, "Value To Replace", "Replacement Value")
Example 1: The following expression will replace the “Test1” value in the source msExchExtensionCustomAttribute1 attribute with “Test-Replaced” and set it in the target.
Source “msExchExtensionCustomAttribute1” = Test1, Test2, Test3
Target Attribute : msExchExtensionCustomAttribute1
Value: UpdateList(S.msExchExtensionCustomAttribute1, “Test1”, “Test-Replaced”)
Example 2: The following expression will replace the “Test1” value in the source msExchExtensionCustomAttribute1 attribute with “Test-Replaced”, Remove “Test2” and set it in the target.
Source “msExchExtensionCustomAttribute1” = Test1, Test2, Test3
Target Attribute : msExchExtensionCustomAttribute1
Value: UpdateList(UpdateList(S.msExchExtensionCustomAttribute1, “Test1”, “Test-Replaced”),”Test2”,NULL)
Purpose: This method is used to convert multi-value attribute values into a string separated by a delimiter and set it on a single value attribute
Syntax: ToString(Delimiter, Value)
Example: The following expression will convert source “msExchExtensionCustomAttribute1” attribute into a string, separated by “,” and set it on “CustomAttribute1” attribute
Source “msExchExtensionCustomAttribute1” = Test1, Test2,Test3
Target Attribute: customAttribute1
Value: ToString(“,”,s. msExchExtensionCustomAttribute1)
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback 使用条款 隐私 Cookie Preference Center