# Transform LifeCycle State

**URL:** <https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms\
**Created:** [February 8, 2023, 1:53pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023 "2023-02-08T13:53:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 8, 2023, 1:53pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/1 "2023-02-08T13:53:23Z")

</div>

Hi All,

I m using the below transform to calculate the Life Cycle state. The issue here i am facing is for leaving case i m not getting proper output. If the Contract\_END\_DATE is null also it shows as leaving. If the Contract\_END\_DATE is wihtin in next 14 days i need to mark the state as Leaving.

Any help s much appreciated !

```json
{
    "id": "333a4ed5-1d52-49fb-abd9-aff607d28193",
    "name": "BLV_Workday_LCS",
    "type": "static",
    "attributes": {
        "requiresPeriodicRefresh": "true",
        "activestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "futureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "farFutureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+15d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "inactivestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            "now"
                        ],
                        "ignoreErrors": "true"
                    }
                },
                "operator": "GT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "leaving": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            "now"
                        ]
                    }
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "value": "#if(($activestate=='yes') && ($inactivestate=='no'))active#elseif($inactivestate=='yes')inactive#elseif(($futureContractor=='yes')&&($activestate=='no'))futureContractor#elseif(($futureContractor=='no')&&($activestate=='no'))farFutureContractor#elseif($leaving=='yes')leaving#{else}UNKNOWN#end"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![tyler\_mairose](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tyler_mairose/32/30112_2.png) [@tyler\_mairose](https://developer.sailpoint.com/discuss/u/tyler_mairose)\
**Post date:** [February 8, 2023, 6:11pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/3 "2023-02-08T18:11:47Z")

</div>

Hello @sabthamis ,

I modified the transform you provided and it should work as expected now, give it a try in your environment!

```json
{
    "id": "333a4ed5-1d52-49fb-abd9-aff607d28193",
    "name": "BLV_Workday_LCS",
    "type": "static",
    "attributes": {
        "requiresPeriodicRefresh": "true",
        "activestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "futureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "farFutureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+15d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "LT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "inactivestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            "now"
                        ],
                        "ignoreErrors": "true"
                    }
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "leaving": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            "now"
                        ]
                    }
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "value": "#if($inactivestate=='yes')inactive#elseif($leaving=='yes')leaving#elseif(($activestate=='yes') && ($inactivestate=='no'))active#elseif(($futureContractor=='yes')&&($activestate=='no'))futureContractor#elseif(($futureContractor=='no')&&($activestate=='no'))farFutureContractor#{else}UNKNOWN#end"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 9, 2023, 11:43am UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/4 "2023-02-09T11:43:53Z")

</div>

> [@tyler\_mairose](#):
>
> ```auto
> {
> "id": "333a4ed5-1d52-49fb-abd9-aff607d28193",
> "name": "BLV_Workday_LCS",
> "type": "static",
> "attributes": {
> "requiresPeriodicRefresh": "true",
> "activestate": {
> "attributes": {
> "firstDate": "now",
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "futureContractor": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+14d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "farFutureContractor": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+15d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "LT",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "inactivestate": {
> "attributes": {
> "firstDate": "now",
> "secondDate": {
> "type": "firstValid",
> "attributes": {
> "values": [
> {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "CONTRACT_END_DATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "now"
> ],
> "ignoreErrors": "true"
> }
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "leaving": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+14d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "type": "firstValid",
> "attributes": {
> "values": [
> {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "CONTRACT_END_DATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "now"
> ]
> }
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "value": "#if($inactivestate=='yes')inactive#elseif($leaving=='yes')leaving#elseif(($activestate=='yes') && ($inactivestate=='no'))active#elseif(($futureContractor=='yes')&&($activestate=='no'))futureContractor#elseif(($futureContractor=='no')&&($activestate=='no'))farFutureContractor#{else}UNKNOWN#end"
> },
> "internal": false
> }
> 
> ```

Thanks for your response !

I can see still not working the User with only HIREDATE and CONTRACT\_END\_DATE as null or blank also it shows as leaving @tyler_mairose

---

<div class="post-metadata">

**Author:** ![tyler\_mairose](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tyler_mairose/32/30112_2.png) [@tyler\_mairose](https://developer.sailpoint.com/discuss/u/tyler_mairose)\
**Post date:** [February 9, 2023, 4:20pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/5 "2023-02-09T16:20:41Z")

</div>

@sabthamis ,

When the user has HIREDATE and CONTRACT\_END\_DATE as null or blank, what is your expected lifecycle state?

---

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 9, 2023, 5:23pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/6 "2023-02-09T17:23:47Z")

</div>

Hi Tyler,

There is not case where both can be null HIREDATE is not null for any user from Workday. so i dont have any case like you mentioned.

Thanks

@tyler_mairose

---

<div class="post-metadata">

**Author:** ![tyler\_mairose](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tyler_mairose/32/30112_2.png) [@tyler\_mairose](https://developer.sailpoint.com/discuss/u/tyler_mairose)\
**Post date:** [February 9, 2023, 5:57pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/7 "2023-02-09T17:57:01Z")

</div>

I misunderstood, in the case of only CONTRACT\_END\_DATE null or empty what should be the lifecycle state?

---

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 10, 2023, 1:45pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/8 "2023-02-10T13:45:11Z")

</div>

Hi Tyler, @tyler_mairose -

In the case when user have only HIREDATE and if the CONTRACT\_END\_DATE is null i m getting the Lifecycle state as leaving. The case 1 is not working rest all 4 is working with the transform.

The requirement here to display the below conditions.

1.If the CONTRACT\_END\_DATE is within next 14 days considering the HIREDATE can be anyvalue (not Null)– Leaving

2.If the CONTRACT\_END\_DATE is in past considering the HIREDATE can be anyvalue (not Null)- Inactive

3.If the HIREDATE is within next 14 days considering the CONTRACT\_END\_DATE can be anyvalue (can be null or not null) - FutureContractor

4.If the HIREDATE is within next 14 days considering the CONTRACT\_END\_DATE can be anyvalue (can be null or not null) - FarFutureContractor

5.If the HIREDATE is in past the CONTRACT\_END\_DATE can be anyvalue (can be null or not null) - Active

Regards,  
Sabthami

---

<div class="post-metadata">

**Author:** ![tyler\_mairose](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tyler_mairose/32/30112_2.png) [@tyler\_mairose](https://developer.sailpoint.com/discuss/u/tyler_mairose)\
**Post date:** [February 10, 2023, 3:58pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/9 "2023-02-10T15:58:06Z")

</div>

@sabthamis

Thank you for the clarification, I had to modify the leaving variable to get it working. See below!

```json
{
    "name": "BLV_Workday_LCS",
    "type": "static",
    "attributes": {
        "requiresPeriodicRefresh": "true",
        "activestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "futureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "GTE",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "farFutureContractor": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+15d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "HIREDATE",
                                "sourceName": "Workday"
                            }
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "LT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "inactivestate": {
            "attributes": {
                "firstDate": "now",
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            "now"
                        ],
                        "ignoreErrors": "true"
                    }
                },
                "operator": "GT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "leaving": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "expression": "now+14d/d",
                        "roundUp": false
                    },
                    "type": "dateMath"
                },
                "secondDate": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "type": "accountAttribute",
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday"
                                        }
                                    },
                                    "inputFormat": "MM/dd/yyyy",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            },
                            {
                                "attributes": {
                                    "expression": "now+14d/d",
                                    "roundUp": false
                                },
                                "type": "dateMath"
                            }
                        ]
                    }
                },
                "operator": "GT",
                "positiveCondition": "yes",
                "negativeCondition": "no"
            },
            "type": "dateCompare"
        },
        "value": "#if($inactivestate=='yes')inactive#elseif($leaving=='yes')leaving#elseif(($activestate=='yes') && ($inactivestate=='no'))active#elseif(($futureContractor=='yes')&&($activestate=='no'))futureContractor#elseif(($futureContractor=='no')&&($activestate=='no'))farFutureContractor#{else}UNKNOWN#end"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 13, 2023, 12:33pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/10 "2023-02-13T12:33:51Z")

</div>

> [@tyler\_mairose](#):
>
> ```auto
> {
> "name": "BLV_Workday_LCS",
> "type": "static",
> "attributes": {
> "requiresPeriodicRefresh": "true",
> "activestate": {
> "attributes": {
> "firstDate": "now",
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "futureContractor": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+14d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "GTE",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "farFutureContractor": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+15d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "HIREDATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "operator": "LT",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "inactivestate": {
> "attributes": {
> "firstDate": "now",
> "secondDate": {
> "type": "firstValid",
> "attributes": {
> "values": [
> {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "CONTRACT_END_DATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> "now"
> ],
> "ignoreErrors": "true"
> }
> },
> "operator": "GT",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "leaving": {
> "attributes": {
> "firstDate": {
> "attributes": {
> "expression": "now+14d/d",
> "roundUp": false
> },
> "type": "dateMath"
> },
> "secondDate": {
> "type": "firstValid",
> "attributes": {
> "values": [
> {
> "attributes": {
> "input": {
> "type": "accountAttribute",
> "attributes": {
> "attributeName": "CONTRACT_END_DATE",
> "sourceName": "Workday"
> }
> },
> "inputFormat": "MM/dd/yyyy",
> "outputFormat": "ISO8601"
> },
> "type": "dateFormat"
> },
> {
> "attributes": {
> "expression": "now+14d/d",
> "roundUp": false
> },
> "type": "dateMath"
> }
> ]
> }
> },
> "operator": "GT",
> "positiveCondition": "yes",
> "negativeCondition": "no"
> },
> "type": "dateCompare"
> },
> "value": "#if($inactivestate=='yes')inactive#elseif($leaving=='yes')leaving#elseif(($activestate=='yes') && ($inactivestate=='no'))active#elseif(($futureContractor=='yes')&&($activestate=='no'))futureContractor#elseif(($futureContractor=='no')&&($activestate=='no'))farFutureContractor#{else}UNKNOWN#end"
> },
> "internal": false
> }
> 
> ```

Thanks for your help @tyler_mairose much appreciated …

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [February 13, 2023, 3:00pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/11 "2023-02-13T15:00:28Z")

</div>

@sabthamis Did Tyler’s solution solve your problem?

---

<div class="post-metadata">

**Author:** ![sabthamis](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sabthamis](https://developer.sailpoint.com/discuss/u/sabthamis)\
**Post date:** [February 14, 2023, 10:46am UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/12 "2023-02-14T10:46:08Z")

</div>

Yes thanks Colin much for your help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:24pm UTC](https://developer.sailpoint.com/discuss/t/transform-lifecycle-state/8023/13 "2023-07-19T14:24:16Z")

</div>

Closed on July 19, 2023, 2:24pm UTC


