Hello Expert,
I am trying to add a condition that will return "none’’ if there is no value in lastLogon
and lastLogonTimestamp. The condition that I added doesn’t seem to work.
Here is the transform I created.
{
"id": "",
"name": "",
"type": "static",
"attributes": {
"date1": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"attributeName": "lastLogon",
"sourceName": "Active Directory Prod"
}
},
{
"attributes": {
"value": "125911584000000000"
},
"type": "static"
}
]
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "yyMMddHH"
}
},
"adLastLogon": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "lastLogon",
"sourceName": "Active Directory Prod"
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "yyyy-MM-dd"
}
},
"date2": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"attributeName": "lastLogonTimestamp",
"sourceName": "Active Directory Prod"
}
},
{
"attributes": {
"value": "125911584000000000"
},
"type": "static"
}
]
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "yyMMddHH"
}
},
"adLastLogonTimestamp": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "lastLogonTimestamp",
"sourceName": "Active Directory Prod"
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "yyyy-MM-dd"
}
},
"value": "#set($i=0)#if(($i.parseInt($date1) gt $i.parseInt($date2)))$adLastLogon#elseif(($i.parseInt($date2) gt $i.parseInt($date1)))$adLastLogonTimestamp#elseif($date1 =='125911584000000000' && $date2 =='125911584000000000')none#{else}$adLastLogon#end"
},
"internal": false
}