I am using a transform to get an attribute value from a source (e.g. Company from UltiPro) and then using if/else velocity statements based on the value in that field. If the user’s source is NELM rather than UltiPro, that value is empty but the velocity errors out. Other than using a firstValid on the Company variable, is there an easier way to handle blank values?
{
“attributes”: {
“Company”: {
“attributes”: {
“attributeName”: “Company”,
“sourceName”: “UltiPro API”
},
“type”: “accountAttribute”
},
“value”: “#if($Company==‘acme’)@acme.com#{else}@othercompany.com#end”
},
“id”: “Email Domain”,
“type”: “static”
}