Date change issue in the transform

Hi There,

The following transform is designed to update the user’s inactive date. If the user status changes to active, the date field should be blank. However, the issue with the current transform is that it updates the inactive date every day. For instance,Today if the inactive date is set to 11/10/23, it updates to 11/11/23 the next day. Date should not get changed everyday. Can anyone guide me on this?

{
    "name": "RPGStudent Disable Date 3",
    "type": "static",
    "attributes": {
        "dateCheck": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "name": "disableddate"
                        },
                        "type": "identityAttribute"
                    },
                    "noValue"
                ]
            },
            "type": "firstValid"
        },
        "studentRegisterationCode": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "STUDENT_REGISTRATION_CODE",
                            "sourceName": "RPG Student Banner Replica"
                        },
                        "type": "accountAttribute"
                    },
                    "noStudentRegisterationCode"
                ]
            },
            "type": "firstValid"
        },
        "recordIndicator": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "RECORD_INDICATOR",
                            "sourceName": "RPG Student Banner Replica"
                        },
                        "type": "accountAttribute"
                    },
                    "noRecordIndicator"
                ]
            },
            "type": "firstValid"
        },
         "currentDate": {
            "attributes": {
                "input": {
                    "attributes": {
                        "expression": "now"
                    },
                    "type": "dateMath"
                },
                "inputFormat": "yyyy-MM-dd",
                "outputFormat": "ISO8601"
            },
            "type": "dateFormat"
        },
        "lifeCycle": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "name": "cloudLifecycleState"
                        },
                        "type": "identityAttribute"
                    },
                    {
                        "attributes": {
                            "value": "nolifeCycle"
                        },
                        "type": "static"
                    }
                ]
            },
            "type": "firstValid"
        },
        "value": "#if($lifeCycle == 'inactive')#if($dateCheck.contains('Z'))$dateCheck#{else}$currentDate#end#if($recordIndicator == 'active' || !(($studentRegisterationCode =='NS') || ($studentRegisterationCode =='WD') || ($studentRegisterationCode =='WA')))#end#end"
    },
    "internal": false
}

Thanks,
Harish G

You can use $oldDate static value and this will keep date once it’s populated.
https://community.sailpoint.com/t5/IdentityNow-Forum/Use-of-oldValue-in-Transforms/m-p/175628#M6145

In case of rehire case you would not be able to change this date in second termination.

We store termination date in AD attribute and then use it from there to make things easier

Are you applying this Transform to disableddate identity attribute itself ?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.