Hello Everyone,
We created a transform that will decided if the UserPass value to be true or false.
It should be true in either of these conditions
[todayDate == $startDate || $todayDate == $startDateMinusTwo || $todayDate == $startDateMinusOne || $todayDate <= $startDatePlusTen]
It working all fine except for “startDatePlusTen”, if someone’s start date is 2025-01-17
it should return true but returning false.
Can anyone please help me what I am doing wrong here?
{
"id": "12345",
"name": "User",
"type": "static",
"attributes": {
"startDate": {
"attributes": {
"expression": "+0d/d",
"roundUp": "false",
"input": {
"attributes": {
"id": "HP-Format_Date_to_ISO",
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "HR",
"attributeName": "DateHired",
},
"type": "accountAttribute"
},
"5/7/2099"
]
},
"type": "firstValid"
}
},
"type": "reference"
}
},
"type": "dateMath"
},
"todayDate": {
"attributes": {
"expression": "now/d",
"roundUp": "false"
},
"type": "dateMath"
},
"startDateMinusOne": {
"attributes": {
"expression": "-1d/d",
"roundUp": "false",
"input": {
"attributes": {
"id": "HP-Format_Date_to_ISO",
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "HR",
"attributeName": "DateHired",
},
"type": "accountAttribute"
},
"5/7/2099"
]
},
"type": "firstValid"
}
},
"type": "reference"
}
},
"type": "dateMath"
},
"startDateMinusTwo": {
"attributes": {
"expression": "-2d/d",
"roundUp": "false",
"input": {
"attributes": {
"id": "HP-Format_Date_to_ISO",
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "HR",
"attributeName": "DateHired",
},
"type": "accountAttribute"
},
"5/7/2099"
]
},
"type": "firstValid"
}
},
"type": "reference"
}
},
"type": "dateMath"
},
"startDatePlusTen": {
"attributes": {
"expression": "+10d/d",
"roundUp": "false",
"input": {
"attributes": {
"id": "HP-Format_Date_to_ISO",
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "HR",
"attributeName": "DateHired",
},
"type": "accountAttribute"
},
"5/7/2099"
]
},
"type": "firstValid"
}
},
"type": "reference"
}
},
"type": "dateMath"
},
"value": "#if(($todayDate == $startDate || $todayDate == $startDateMinusTwo || $todayDate == $startDateMinusOne || $todayDate <= $startDatePlusTen))true#{else}false#end"
},
"internal": false
}```