AnsweredAssumed Answered

User Attribute in Base Name Transform

How do I pass in an existing Identity's attribute as a parameter in the Base Name Transform java code?  I.e., I want to pass in the User.User_Id (a.k.a. employeeNumber) value.

 

Sample code:

OUTPUT_VALUE = transform();
function transform()
{
var firstNum;
var letterSub;

firstNum = employeeNumber.substr(0,1);

if (firstNum == 6) {
  letterSub = "f";
}
else if (firstNum == 7) {
  letterSub = "g";
}
else if (firstNum == 8) {
  letterSub = "h";
}
else if (firstNum == 9) {
  letterSub = "i";
}
else {
  letterSub = "z";
}

return letterSub + employeeNumber.substr(1, 4);
}

Outcomes