Forum Discussion

Ajay_Joshi's avatar
Ajay_Joshi
Brass Contributor
Dec 08, 2023

Prepend a constant value to an existing attribute EmployeeID in the Sync rule - AD Connect

We need to create a new custom attribute in Azure AD Connect for syncing, call it OneTrustEmployeeID and populate it like:-
OneTrustEmployeeID = "ISO Code of Country" + EmployeeID

We are getting an "Append function is undefined" error by the use of this expression in the transformation tab of the sync rules:-

Append([EmployeeID], "+91")

  • Resolved by using the following expression:-

    CStr("IN") & [employeeID]
    or
    IIF(IsNullOrEmpty([employeeID]),NULL,CStr("IN") & [employeeID])

    If concatenating a number with a String type Attribute value:-

    CStr(91) & [employeeID]
    or
    IIF(IsNullOrEmpty([employeeID]),NULL,CStr(91) & [employeeID])
  • Ajay_Joshi's avatar
    Ajay_Joshi
    Brass Contributor
    Resolved by using the following expression:-

    CStr("IN") & [employeeID]
    or
    IIF(IsNullOrEmpty([employeeID]),NULL,CStr("IN") & [employeeID])

    If concatenating a number with a String type Attribute value:-

    CStr(91) & [employeeID]
    or
    IIF(IsNullOrEmpty([employeeID]),NULL,CStr(91) & [employeeID])
  • I am confused, Append Adds to the End of the String, so you would be creating Employee ID + "ISO Code" - Wouldn't you need Join("","+91",[EmployeeID]) anyways?
    • Ajay_Joshi's avatar
      Ajay_Joshi
      Brass Contributor

      juliansperling Thanks so much for looking at this. Guess you are right, I took Append as Prepend. However, it was giving this error and I've tried Join, it errors out in evaluation later. All users got sync general failure. I've modified the transformation in the User Common rule, should it be done on a different rule? Would that matter??

Resources