Hi Everyone,
We have a requirement to modify the SNOW user account details after 90 days of user termination by appending the date in the following format yyyyMMdd_User_name.
I have created the following transform but getting this error - There was an exception while calculating the value for this attribute. Error during transformation for attribute: snowUsername. : DateMathTransform requires an input date or date expression with ‘now’
Any inputs would be appreciated!
{
"id": "",
"name": "SNOW UserName TerminationDate Prefix",
"type": "static",
"attributes": {
"dateCompareResult": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateMath",
"attributes": {
"expression": "+90d",
"roundUp": false,
"input": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"sourceName": "Workday",
"attributeName": "TERMINATION_DATE"
}
},
{
"type": "accountAttribute",
"attributes": {
"sourceName": "Acquisitions - TEST",
"attributeName": "endDate"
}
},
"12/23/2300"
]
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
}
}
},
"secondDate": "now",
"operator": "lte",
"positiveCondition": "yes",
"negativeCondition": "no"
}
},
"DatePrefixSnowUsername": {
"type": "concat",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"sourceName": "Workday",
"attributeName": "TERMINATION_DATE"
}
},
{
"type": "accountAttribute",
"attributes": {
"sourceName": "Acquisitions - TEST",
"attributeName": "endDate"
}
}
}
]
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
"_",
{
"type": "accountAttribute",
"attributes": {
"sourceName": "ServiceNow - QA",
"attributeName": "user_name"
}
}
]
}
},
"SnowUserName": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"sourceName": "ServiceNow",
"attributeName": "user_name"
}
},
{
"type": "accountAttribute",
"attributes": {
"sourceName": "ServiceNow - QA",
"attributeName": "user_name"
}
},
{
"type": "static",
"attributes": {
"value": "no-username"
}
}
]
}
},
"cloudLifecycleState": {
"attributes": {
"name": "cloudLifecycleState"
},
"type": "identityAttribute"
},
"value": "#if($cloudLifecycleState == 'active')$SnowUserName#elseif($dateCompareResult == 'yes' && $cloudLifecycleState == 'inactive')$DatePrefixSnowUsername#{else}#end"
},
"internal": false
'''