Chat now with support
Chat mit Support

Binary Tree Power365 Current - Power365 Directory Sync Advanced Mappings Guide

Boolean Constants

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.

Math

  • 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

Value Comparison

  • 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)

Boolean Combinations

  • Purpose: Combinations of operations can be achieved with the following.

  • Syntax:

    And    

    Or

    ! (not)

  • Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)

Boolean Constants

  • 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)

case

  • 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

if

  • 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

case

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.

Math

  • 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

Value Comparison

  • 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)

Boolean Combinations

  • Purpose: Combinations of operations can be achieved with the following.

  • Syntax:

    And    

    Or

    ! (not)

  • Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)

Boolean Constants

  • 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)

case

  • 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

if

  • 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

if

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.

Math

  • 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

Value Comparison

  • 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)

Boolean Combinations

  • Purpose: Combinations of operations can be achieved with the following.

  • Syntax:

    And    

    Or

    ! (not)

  • Example: Action = "create" or (Action = "update" and Target.HasCreateStamp)

Boolean Constants

  • 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)

case

  • 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

if

  • 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

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.

empty

  • 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)

contains

  • 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")

ends

  • 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")

length

  • 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

lower

  • 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

replace

  • 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

starts

  • 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")

trim

  • 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

trunc

  • 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

upper

  • 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

index

  • 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

Prefix

  • 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

Suffix

  • 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

Right

  • 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

Left

  • 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

Substring

  • 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

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen