none
displayName composition RRS feed

  • Question

  • Hi,

    I'm doing displayName composition in AD.

    Firstname Middlename Lastname - CompanyName

    Problem is, that only contractors have CompanyName populated in HR. Export for users that does not have CompanyName pupulated does not work, i guess this is "the way it is"

    So what i would like to do is: populate CompanyName for all users.

    • If CompanyName present, flow %value%, else flow "constant"   <- Pseudo sync rule

    Is this possible?

    I don't want to do separate sync rule for employee's vs. contractors.


    /Frederik Leed

    Tuesday, December 4, 2012 1:21 PM

Answers

  • IIF(IsPresent(COMPANY_NAME),COMPANY_NAME,"CustomString")

    /Frederik Leed

    • Marked as answer by FrederikLeed Wednesday, December 5, 2012 8:29 AM
    Wednesday, December 5, 2012 8:29 AM
  • Just to add. The above is the means to populate CompanyName for all users, even though some doesn't have the attribute populated in HR.

    This is the means to update DisplayName attribute in AD, where only Contrators have the " - CompanyName" part.

    • IIF(Eq(CompanyName,"CustomString"),ReplaceString(CompanyName,"CustomString","")," - "+Trim(CompanyName))

    /Frederik Leed

    • Marked as answer by FrederikLeed Wednesday, December 5, 2012 10:16 AM
    • Edited by FrederikLeed Wednesday, December 5, 2012 10:17 AM
    Wednesday, December 5, 2012 10:16 AM

All replies

  • Yes, you can do this by using the IIF function in your synchronization rule.
    Here is a link to the reference.

    Here are some related posts:

     

    Cheers,
    Markus


    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation


    Tuesday, December 4, 2012 2:34 PM
  • Thanks Marcus, i guess the tricky part is doing the "Not NULL" part?

    IIF(IsPresent(CompanyName),Trim,ReplaceString(CompanyName, "Constant") <--


    /Frederik Leed


    Tuesday, December 4, 2012 2:50 PM
  • I'm not sure I understand what your issue is.
    Could you please clarify?

    Cheers,
    Markus


    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation

    Tuesday, December 4, 2012 3:32 PM
  • Issue is that only contracters have populated CompanyName from HR and i need to do displayName in AD. displayName for contractors needs to contain CompanyName for security reasons.

    If i make outbound sync rule; "FirstName MiddleName LastName - CompanyName" the rule is only applied to users that has CompanyName populated. So employee's will not get updated displayName.

    Therefore my plan is to Populate CompanyName for everyone, by flowing constant to users that does not have CompanyName populated.

    Makes sense?


    /Frederik Leed


    • Edited by FrederikLeed Wednesday, December 5, 2012 7:54 AM
    Wednesday, December 5, 2012 7:54 AM
  • IIF(IsPresent(COMPANY_NAME),COMPANY_NAME,"CustomString")

    /Frederik Leed

    • Marked as answer by FrederikLeed Wednesday, December 5, 2012 8:29 AM
    Wednesday, December 5, 2012 8:29 AM
  • Just to add. The above is the means to populate CompanyName for all users, even though some doesn't have the attribute populated in HR.

    This is the means to update DisplayName attribute in AD, where only Contrators have the " - CompanyName" part.

    • IIF(Eq(CompanyName,"CustomString"),ReplaceString(CompanyName,"CustomString","")," - "+Trim(CompanyName))

    /Frederik Leed

    • Marked as answer by FrederikLeed Wednesday, December 5, 2012 10:16 AM
    • Edited by FrederikLeed Wednesday, December 5, 2012 10:17 AM
    Wednesday, December 5, 2012 10:16 AM