The attached transform refers to 3 different transforms and based on the value we get as output from them, we have written the “value” condition to calculate the status of the user.
The 3 attributes are,
- wdstatus - refers to a different transform that returns the output to be either “Active” or “Inactive”
- lhstatus - refers to a different transform that returns the output to be either “inactivelegalhold” or “NONE”
- conversionstatus - refers to a different transform that returns the output to be either “true” or “false”
Individually the transforms are working fine. Getting the desired output. But when we use the values returned from these transforms into the “Value” condition below, we aren’t returning the default value of the condition. Kindly let me know what is going wrong with this condition.
What we want to achieve:
wdstatus: active and conversionstatus:inactive then status of the user: active
wdstatus: inactive and conversionstatus:active then status of the user: active
wdstatus: active and conversionstatus:active then status of the user: active
wdstatus: inactive and conversionstatus:inactive then status of the user: inactive
lhstatus is not equal to “NONE”, then status of the user: inactivelegalhold
Tried the below conditions and none seem to work. Kindly let me know where I’m going wrong,
-
“value”: “#if(($wdstatus == ‘active’ && $conversionstatus==‘false’) || ($wdstatus == ‘active’ && $conversionstatus==‘true’) || ($wdstatus == ‘inactive’ && $conversionstatus==‘true’))active#{elseif}($lhstatus != ‘NONE’)inactivelegalhold#{else}inactive#end”
-
“value”: “#if($wdstatus == ‘inactive’ && $conversionstatus==‘true’)active#{elseif}($wdstatus == ‘inactive’ && $conversionstatus==‘false’)inactive#{elseif}($lhstatus != ‘NONE’)inactivelegalhold#{else}active#end”
-
“value”: “#if($wdstatus == ‘inactive’ && $conversionstatus==‘true’)active#{elseif}($wdstatus == ‘active’ && $conversionstatus==‘false’)active#{elseif}($wdstatus == ‘active’ && $conversionstatus==‘true’)active#{elseif}($lhstatus != ‘NONE’)inactivelegalhold#{else}inactive#end”
{
"name": "Life Cycle State - Conversion Sowmi Test",
"type": "static",
"attributes": {
"wdstatus": {
"attributes": {
"id": "Workday Lifecycle State based on Date"
},
"type": "reference"
},
"lhstatus": {
"attributes": {
"values": [
{
"attributes": {
"id": "LegalHoldValue"
},
"type": "reference"
},
"NONE"
]
},
"type": "firstValid"
},
"conversionstatus": {
"attributes": {
"id": "User Conversion - Sowmi Test"
},
"type": "reference"
},
"value": "#if($wdstatus == 'active' && $conversionstatus=='true')active#{elseif}($wdstatus == 'active' && $conversionstatus=='false')active##{elseif}($wdstatus == 'inactive' && $conversionstatus=='false')inactive#{elseif}($wdstatus == 'inactive' && $conversionstatus=='true')active#{elseif}($lhstatus != 'NONE')inactivelegalhold#{else}inactive#end"
},
}