There was an exception while calculating the value for this attribute. Error rendering template: #if($existingTitle != 'empty' && $newTitle != 'empty' && existingTitle != $(newTitle) && $titleChange != $(todaysDate))$todaysDate#end
I only want to write data if all of the conditions are met. The use case is to have a searchable identity attribute to detect when the title changes. It should write out today’s date MM/dd/yyyy.
Below is the full transform. Does VLT have a limit as to the number of evaluations it can calculate? I think my todaysDate logic looks right. I believe I have handled all null conditions.
{
"id": "92db54dc-8e95-4af4-8a03-6f9dad5b1d4f",
"name": "SB-Title Change Date-TST",
"type": "static",
"attributes": {
"newTitle": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "JOBTITLE",
"sourceName": "TST"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "empty"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"existingTitle": {
"attributes": {
"values": [
{
"attributes": {
"name": "title"
},
"type": "identityAttribute"
},
{
"attributes": {
"value": "empty"
},
"type": "static"
}
]
},
"type": "firstValid",
"ignoreErrors": "true"
},
"titleChange": {
"attributes": {
"values": [
{
"attributes": {
"name": "titleChangeDate"
},
"type": "identityAttribute"
},
{
"attributes": {
"value": "empty"
},
"type": "static"
}
]
},
"type": "firstValid",
"ignoreErrors": "true"
},
"todaysDate": {
"attributes": {
"inputFormat": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
"outputFormat": "MM/dd/yyyy",
"input": {
"attributes": {
"input": "",
"expression": "now",
"roundUp": false
},
"type": "dateMath"
}
},
"type": "dateFormat"
},
"value": "#if($existingTitle != 'empty' && $newTitle != 'empty' && existingTitle != $newTitle && $titleChange != $todaysDate)$todaysDate#end"
},
"internal": false
}