I have one requirement where we need a transform to append U,UA,UB as prefix to the filenumber attribute which is coming from workday to make USERID attribute.
So requirement is if number is of 6 digit then append U in prefix example : if filenumber from workday is 023456 then output USERID should be U023456
And if the number is a 7 digit number and starting two digit of the nuumber is 10 then in place of 10 we need UA EXAMPLE: if filenumber from workday is coming as 1023456 then output userid shud be UA23456
And same as above if number is 1123456 then we need to repalce 11 with UB and output shud be UB23456 .
kind;ly help me with the rule or transform.
in below identity prifile attribute we need to apply transform
There was an exception while calculating the value for this attribute. Error during transformation for attribute: userId (Transform ID: PrefixAppend) Cause: Error rendering template: #if($FILENUMBER.length() == 6)U$FILENUMBER#{elseif}($FILENUMBER.length() == 7 && $FILENUMBER.startsWith(“10”))UA$FILENUMBER.substring(2,$FILENUMBER.length())#{elseif}($FILENUMBER.length() == 7 && $FILENUMBER.startsWith(“11”))UB$FILENUMBER.substring(2,$FILENUMBER.length())#{else}$ID#end
What was the input value? You often get that sort of error message if the input value is missing. You can fix that by adding a firstValid transform and setting a default value if the attribute is NULL