Dear all, I need support in transform, where I validate the date received by the leave_end_date field, and I need it to return in the field if the condition is “active” or “vacation” in the first minute of the future day, that is, example: if leave_end_date is equal to “2025-02-10” I need you to consult and activate it only if the date is “2025-02-11”
follow the transform
{
"name": "PP_Employee_status_V1",
"type": "lookup",
"attributes": {
"input": {
"type": "static",
"attributes": {
"dataFimAfastamento": {
"attributes": {
"values": [
{
"attributes": {
"firstDate": {
"attributes": {
"expression": "+1d",
"input": {
"attributes": {
"input": {
"attributes": {
"attributeName": "leave_end_date",
"sourceName": "ms-witchcraft-absences - PROD"
},
"type": "accountAttribute"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"secondDate": "now",
"operator": "gt",
"positiveCondition": "ativo",
"negativeCondition": "ferias"
},
"type": "dateCompare"
},
"null"
]
},
"type": "firstValid"
},
"status": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "employee_status",
"sourceName": "ms-witchcraft-absences - PROD"
},
"type": "accountAttribute"
},
"null"
]
},
"type": "firstValid"
},
"value": "#if($status == 'ATIVO' && $dataFimAfastamento == 'ativo')1#elseif($status == 'Férias' && $dataFimAfastamento == 'ativo')1#elseif($status == 'Férias' && $dataFimAfastamento == 'ferias')2#{else}1#end"
}
},
"table": {
"1": "ativo",
"2": "ferias",
"default": "outros"
}
},
"internal": false
}