Hello,
I wrote this transform:
{
"name": "Transform - Username choice",
"type": "static",
"attributes": {
"ignoreErrors": "true",
"USER_NAME": {
"attributes": {
"sourceName": "HR Oracle HCM Cloud (Source)",
"attributeName": "USER_NAME"
},
"type": "accountAttribute"
},
"PERSON_NUMBER": {
"attributes": {
"sourceName": "HR Oracle HCM Cloud (Source)",
"attributeName": "PERSON_NUMBER"
},
"type": "accountAttribute"
},
"sAMAccountName": {
"attributes": {
"sourceName": "AD Tier 2 (Source)",
"attributeName": "sAMAccountName"
},
"type": "accountAttribute"
},
"value": "#if(!$USER_NAME) #if(!$sAMAccountName) $PERSON_NUMBER #else $sAMAccountName #end #else $USER_NAME #end"
}
}
But it gives me this error:
There was an exception while calculating the value for this attribute. Error during transformation for attribute: uid (Transform ID: Transform - Username choice) Cause: Error rendering template: #if(!$USER_NAME) $PERSON_NUMBER #else $USER_NAME #end
The problem is in the management of null values I think, because when the USER_NAME attribute is null I get this error. Do you know to manage empty attributes? Thanks in advance