Hi everyone, I need help.
I’m developing a validation function in my transformation. I need to validate whether the “lifecycleState” attribute is different from 1, 2, or 3 and whether the “titleException” attribute contains the value “SUPERINTENDENT.”
But it’s not working correctly.
my transform
{
“id”: “0000000000”,
“name”: “Set LifeCycleStatus”,
“type”: “static”,
“attributes”: {
“codigoSituacao”: {
“type”: “lookup”,
“attributes”: {
“input”: {
“type”: “firstValid”,
“attributes”: {
“values”: [
{
“type”: “accountAttribute”,
“attributes”: {
“sourceName”: “source - DB”,
“attributeName”: “CODIGO_SITUACAO”
}
},
{
“type”: “static”,
“attributes”: {
“value”: “-”
}
}
]
}
},
“table”: {
“0”: “terminated”,
“1”: “active”,
“2”: “terminated”,
“3”: “terminated”,
“4”: “terminated”,
“5”: “leaveofabsence”,
“6”: “leaveofabsence”,
“7”: “leaveofabsence”,
“8”: “leaveofabsence”,
“9”: “vacation”,
“10”: “leaveofabsence”,
“11”: “leaveofabsence”,
“12”: “leaveofabsence”,
“13”: “leaveofabsence”,
“14”: “terminated”,
“15”: “active”,
“16”: “leaveofabsence”,
“17”: “leaveofabsence”,
“18”: “leaveofabsence”,
“19”: “leaveofabsence”,
“20”: “leaveofabsence”,
“21”: “leaveofabsence”,
“22”: “leaveofabsence”,
“23”: “leaveofabsence”,
“24”: “leaveofabsence”,
“25”: “leaveofabsence”,
“26”: “terminated”,
“27”: “terminated”,
“28”: “terminated”,
“29”: “terminated”,
“30”: “leaveofabsence”,
“31”: “active”,
“32”: “leaveofabsence”,
“33”: “active”,
“34”: “terminated”,
“35”: “terminated”,
“36”: “terminated”,
“37”: “terminated”,
“38”: “leaveofabsence”,
“39”: “leaveofabsence”,
“40”: “leaveofabsence”,
“41”: “leaveofabsence”,
“42”: “leaveofabsence”,
“43”: “leaveofabsence”,
“44”: “terminated”,
“45”: “leaveofabsence”,
“46”: “leaveofabsence”,
“47”: “leaveofabsence”,
“48”: “terminated”,
“49”: “leaveofabsence”,
“51”: “terminated”,
“52”: “terminated”,
“53”: “terminated”,
“54”: “leaveofabsence”,
“55”: “terminated”,
“56”: “terminated”,
“57”: “terminated”,
“58”: “terminated”,
“59”: “terminated”,
“61”: “terminated”,
“91”: “leaveofabsence”,
“92”: “leaveofabsence”,
“95”: “leaveofabsence”,
“96”: “leaveofabsence”,
“99”: “terminated”,
“100”: “leaveofabsence”,
“101”: “leaveofabsence”,
“102”: “leaveofabsence”,
“103”: “leaveofabsence”,
“104”: “leaveofabsence”,
“105”: “leaveofabsence”,
“106”: “leaveofabsence”,
“107”: “leaveofabsence”,
“108”: “leaveofabsence”,
“109”: “leaveofabsence”,
“110”: “leaveofabsence”,
“111”: “leaveofabsence”,
“112”: “leaveofabsence”,
“113”: “leaveofabsence”,
“114”: “leaveofabsence”,
“115”: “leaveofabsence”,
“116”: “leaveofabsence”,
“117”: “terminated”,
“118”: “leaveofabsence”,
“119”: “leaveofabsence”,
“120”: “leaveofabsence”,
“1001”: “leaveofabsence”,
“default”: “active”
}
}
},
“endDate”: {
“type”: “reference”,
“attributes”: {
“id”: “End Date Reached”
}
},
“codSituation”: {
“type”: “firstValid”,
“attributes”: {
“values”: [
{
“type”: “accountAttribute”,
“attributes”: {
“sourceName”: “source - DB”,
“attributeName”: “CODIGO_SITUACAO”
}
},
{
“type”: “static”,
“attributes”: {
“value”: “-”
}
}
]
}
},
“titleException”: {
“type”: “firstValid”,
“attributes”: {
“values”: [
{
“type”: “identityAttribute”,
“attributes”: {
“name”: “title”
}
},
{
“type”: “static”,
“attributes”: {
“value”: “-”
}
}
]
}
},
“lifecycleState”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “situation”
}
},
“value”: “#if($endDate == ‘demitido’ && $codSituation == ‘2’)terminated#elseif($endDate == ‘demitido’ && $codSituation == ‘3’)terminated#elseif($lifecycleState != ‘1’ || $lifecycleState !=‘2’ || $lifecycleState !=‘3’ && $titleException.contains(‘SUPERINTENDENTE’))leaveexception#{else}$codigoSituacao#end”
},
“internal”: false
}
the field “situation” is correct, but the field title does not contain “SUPERINTENDENT”
