# Error in LCS state transform

**URL:** <https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, lifecycle-management, identity-security-cloud\
**Created:** [November 9, 2023, 1:21pm UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701 "2023-11-09T13:21:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_accenture](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Harish\_accenture](https://developer.sailpoint.com/discuss/u/Harish_accenture)\
**Post date:** [November 9, 2023, 1:21pm UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/1 "2023-11-09T13:21:46Z")

</div>

Hi There,

I am getting following error message **There was an exception while calculating the value for this attribute. Text ‘Inactive’ could not be parsed at index 0** on below transform. I have doubt in **endDategreaterTNowCheck**. Can anyone help me here?

{  
“id”: “4ab2d7bb-aa61-49a0-90ab-f61cf7c75ec2”,  
“name”: “Joiner LifeCycleState Transform (SAP HR - Dev)4”,  
“type”: “static”,  
“attributes”: {  
“stat2Current”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “STAT2\_Current”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
{  
“attributes”: {  
“value”: “blank”  
},  
“type”: “static”  
}  
]  
},  
“type”: “firstValid”  
},  
“stat2Next”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “STAT2\_Next”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
{  
“attributes”: {  
“value”: “blank”  
},  
“type”: “static”  
}  
]  
},  
“type”: “firstValid”  
},  
“massn\_begda”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “MASSN\_BEGDA”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
{  
“attributes”: {  
“value”: “blank”  
},  
“type”: “static”  
}  
]  
},  
“type”: “firstValid”  
},  
“endDategreaterTNowCheck”: {  
“type”: “dateCompare”,  
“attributes”: {  
“firstDate”: {  
“input”: {  
“type”: “dateMath”,  
“attributes”: {  
“expression”: “+60d/d”,  
“roundUp”: false,  
“input”: {  
“type”: “dateFormat”,  
“attributes”: {  
“input”: {  
“type”: “firstValid”,  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“input”: {  
“attributes”: {  
“attributeName”: “MASSN\_BEGDA”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
{  
“type”: “static”,  
“attributes”: {  
“value”: “9999-10-31”  
}  
}  
]  
}  
},  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
}  
}  
}  
},  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“secondDate”: {  
“attributes”: {  
“input”: {  
“attributes”: {  
“expression”: “now/d”,  
“roundUp”: false  
},  
“type”: “dateMath”  
},  
“inputFormat”: “dd/MM/yyyy”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
“operator”: “gt”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”  
}  
},  
“begdagreaterTNowCheck”: {  
“type”: “dateCompare”,  
“attributes”: {  
“firstDate”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “STAT2\_Next”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
{  
“attributes”: {  
“input”: “1999-12-31”,  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
}  
]  
},  
“type”: “firstValid”  
},  
“secondDate”: {  
“attributes”: {  
“input”: {  
“attributes”: {  
“expression”: “now/d”,  
“roundUp”: false  
},  
“type”: “dateMath”  
},  
“inputFormat”: “yyyy-MM-dd’T’HH:mm:ss.SSSZ”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
“operator”: “gt”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”  
}  
},  
“lapsedStatus”: {  
“type”: “dateCompare”,  
“attributes”: {  
“firstDate”: {  
“attributes”: {  
“input”: {  
“attributes”: {  
“expression”: “now/d”,  
“roundUp”: false  
},  
“type”: “dateMath”  
},  
“inputFormat”: “yyyy-MM-dd’T’HH:mm:ss.SSSZ”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
“secondDate”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“input”: {  
“attributes”: {  
“name”: “SAP HR Development Lapsed date”  
},  
“type”: “reference”  
},  
“inputFormat”: “ISO8601”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
{  
“attributes”: {  
“input”: “9999-10-31T00:00:00.000Z”,  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
}  
]  
},  
“type”: “firstValid”  
},  
“operator”: “gte”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”  
}  
},  
“nowplusone”: {  
“type”: “conditional”,  
“attributes”: {  
“firstDate”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“input”: {  
“attributes”: {  
“sourceName”: “SAP HR - Development”,  
“attributeName”: “STAT2\_BEGDA”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
},  
{  
“attributes”: {  
“input”: “1999-12-31”,  
“inputFormat”: “yyyy-MM-dd”,  
“outputFormat”: “ISO8601”  
},  
“type”: “dateFormat”  
}  
]  
},  
“type”: “firstValid”  
},  
“secondDate”: {  
“type”: “dateFormat”,  
“attributes”: {  
“input”: {  
“type”: “dateMath”,  
“attributes”: {  
“expression”: “now+1d/d”  
}  
},  
“inputFormat”: “yyyy-MM-dd’T’HH:mm:ss.SSSZ”,  
“outputFormat”: “ISO8601”  
}  
},  
“expression”: “$firstDate eq $secondDate”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”  
}  
},  
“supervisor”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “Supervisor”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
“Supervisor value is Null”  
]  
},  
“type”: “firstValid”  
},  
“personalemail”: {  
“attributes”: {  
“values”: [  
{  
“attributes”: {  
“attributeName”: “EMAIL\_PRIVATE”,  
“sourceName”: “SAP HR - Development”,  
“accountPropertyFilter”: “(MAIN\_RECORD == "Y")”  
},  
“type”: “accountAttribute”  
},  
“Personal Email is Null”  
]  
},  
“type”: “firstValid”  
},  
“value”: “#if($stat2Current ==‘Inactive’ && $stat2Next == ‘blank’ && $endDategreaterTNowCheck == ‘false’ && $lapsedStatus == ‘false’)inactive#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && (($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null"))) missing\_information#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && $nowplusone ==‘false’ && !(($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null"))))prejoiner#elseif(($stat2Current == ‘Active’ || ($stat2Next == ‘Active’ && $stat2Current ==‘Inactive’ && $nowplusone ==‘true’)))active#elseif($lapsedStatus == ‘true’)Lapsed#end”  
},  
“internal”: false  
}

Thanks,

---

<div class="post-metadata">

**Author:** ![sharvari](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@sharvari](https://developer.sailpoint.com/discuss/u/sharvari)\
**Post date:** [November 9, 2023, 1:32pm UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/2 "2023-11-09T13:32:26Z")

</div>

> [@Harish\_accenture](#):
>
> inactive#elseif($stat2Current ==‘Inactive’

Please check your transform, the following elseif parenthesis is not closed out.

---

<div class="post-metadata">

**Author:** ![Harish\_accenture](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Harish\_accenture](https://developer.sailpoint.com/discuss/u/Harish_accenture)\
**Post date:** [November 9, 2023, 1:48pm UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/3 "2023-11-09T13:48:57Z")

</div>

I am seeing the same error after updating the parenthesis.  
“value”: “#if($stat2Current ==‘Inactive’ && $stat2Next == ‘blank’ && $endDategreaterTNowCheck == ‘false’ && $lapsedStatus == ‘false’)inactive#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && (($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null")))) missing\_information#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && $nowplusone ==‘false’ && !(($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null"))))prejoiner#elseif(($stat2Current == ‘Active’ || ($stat2Next == ‘Active’ && $stat2Current ==‘Inactive’ && $nowplusone ==‘true’)))active#elseif($lapsedStatus == ‘true’)Lapsed#end”

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [November 9, 2023, 2:11pm UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/4 "2023-11-09T14:11:25Z")

</div>

> [@Harish\_accenture](#):
>
> “value”: “#if($stat2Current ==‘Inactive’ && $stat2Next == ‘blank’ && $endDategreaterTNowCheck == ‘false’ && $lapsedStatus == ‘false’)inactive#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && (($supervisor.contains(“Supervisor value is Null”)) || ($personalemail.contains(“Personal Email is Null”))) missing\_information#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && $nowplusone ==‘false’ && !(($supervisor.contains(“Supervisor value is Null”)) || ($personalemail.contains(“Personal Email is Null”))))prejoiner#elseif(($stat2Current == ‘Active’ || ($stat2Next == ‘Active’ && $stat2Current ==‘Inactive’ && $nowplusone ==‘true’)))active#elseif($lapsedStatus == ‘true’)Lapsed#end”  
> },

your first elseif is still missing a closing paren.

try this:

```auto
#if($stat2Current ==‘Inactive’ && $stat2Next == ‘blank’ && $endDategreaterTNowCheck == ‘false’ && $lapsedStatus == ‘false’)inactive#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && (($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null"))))missing_information#elseif($stat2Current ==‘Inactive’ && $stat2Next == ‘Active’ && $begdagreaterTNowCheck == ‘true’ && $nowplusone ==‘false’ && !(($supervisor.contains("Supervisor value is Null")) || ($personalemail.contains("Personal Email is Null"))))prejoiner#elseif(($stat2Current == ‘Active’ || ($stat2Next == ‘Active’ && $stat2Current ==‘Inactive’ && $nowplusone ==‘true’)))active#elseif($lapsedStatus == ‘true’) Lapsed#end

```

---

<div class="post-metadata">

**Author:** ![Harish\_accenture](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Harish\_accenture](https://developer.sailpoint.com/discuss/u/Harish_accenture)\
**Post date:** [November 10, 2023, 6:30am UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/5 "2023-11-10T06:30:03Z")

</div>

Thanks for the help! It worked 🙂

---

<div class="post-metadata">

**Author:** ![Harish\_accenture](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Harish\_accenture](https://developer.sailpoint.com/discuss/u/Harish_accenture)\
**Post date:** [November 10, 2023, 6:30am UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/6 "2023-11-10T06:30:28Z")

</div>

Thank you so much! It worked 🙂

---

<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:** [January 9, 2024, 6:31am UTC](https://developer.sailpoint.com/discuss/t/error-in-lcs-state-transform/20701/7 "2024-01-09T06:31:24Z")

</div>

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