Error in LCS state transform

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,

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

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”

your first elseif is still missing a closing paren.

try this:

#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
1 Like

Thanks for the help! It worked :slight_smile:

Thank you so much! It worked :slight_smile:

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