In below transform I’m trying to change JOBCODE
to 1 if DEPT
value is changed. But, on debugging what I observed that $oldValue returns old value JOBCODE
itself(as transform is applied on it) instead of old value of DEPT
. What I should do to get old DEPT
value so that I can compare it?
{
"id": "JobCode Change Status",
"type": "static",
"attributes": {
"requiresPeriodicRefresh" : "true",
"deptChange": {
"attributes": {
"expression": "$department eq $olddepartment",
"positiveCondition": "true",
"negativeCondition": "false",
"department": {
"attributes": {
"sourceName": "Delimited File",
"attributeName": "DEPT"
},
"type": "accountAttribute"
},
"olddepartment": {
"attributes": {
"input": {
"attributes": {
"ignoreErrors": "true",
"values": [
"$oldValue",
{
"attributes": {
"sourceName": "Delimited File",
"attributeName": "DEPT"
},
"type": "accountAttribute"
},
"none"
]
},
"type": "firstValid"
}
},
"type": "lower"
}
},
"type": "conditional"
},
"value": "#if($deptChange.equalsIgnoreCase('false'))1#end"
}
}