I am creating a Transform to determine Life Cycle State based on End Date.
Following is the validation I have in Transform:
- Checking End Date is Past Date - must be treated as Terminated
- Compare End Date and Current date - If the current date is 30 days passed End date - then treated as Terminated, if the current data is not passed 30 days from End Date then treated as Inactive
- Else Identity is considered as Active
For this I have created Transform:
{
"name": "LifecycleStateTransfrom_30daypastenddatecheck",
"type": "static",
"attributes": {
"inPast": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "dateMath",
"attributes": {
"expression": "now/d"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "A Test HR Source",
"attributeName": "end_date"
}
},
"inputFormat": "MM/d/yyyy K:m:s a z",
"outputFormat": "ISO8601"
}
},
"operator": "gte",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"thirtyDayPastEndDateCheck": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateMath",
"attributes": {
"expression": "now/d"
}
},
"secondDate": {
"type": "dateMath",
"attributes": {
"input": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "A Test HR Source",
"attributeName": "end_date"
}
},
"inputFormat": "MM/d/yyyy K:m:s a z",
"outputFormat": "ISO8601"
}
},
"expression": "+30d"
}
},
"operator": "gte",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"value": "#if($inPast=='true' && $thirtyDayPastEndDateCheck == 'false')inactive#elseif($thirtyDayPastEndDateCheck == 'true')terminated#{else}active#end"
}
}
Have applied this transform to Cloud LifeCycle State attribute in Identity Profile and observing following error when previewed to test the transform
There was an exception while calculating the value for this attribute. Error during transformation for attribute: cloudLifecycleState (Transform ID: LifecycleStateTransfrom_30daypastenddatecheck) Cause: DateCompare failed: both firstDate and secondDate must be provided. Current values: firstDate[2025-09-21T00:00Z], secondDate[null]
For user the End date format displayed on the UI is:
Our HR Source is JDBC Asset and date format is:
Please suggest me what is the change to be made in transform to fix the error