Hi There,
The following transform is designed to update the user’s inactive date. If the user status changes to active, the date field should be blank. However, the issue with the current transform is that it updates the inactive date every day. For instance,Today if the inactive date is set to 11/10/23, it updates to 11/11/23 the next day. Date should not get changed everyday. Can anyone guide me on this?
{
"name": "RPGStudent Disable Date 3",
"type": "static",
"attributes": {
"dateCheck": {
"attributes": {
"values": [
{
"attributes": {
"name": "disableddate"
},
"type": "identityAttribute"
},
"noValue"
]
},
"type": "firstValid"
},
"studentRegisterationCode": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "STUDENT_REGISTRATION_CODE",
"sourceName": "RPG Student Banner Replica"
},
"type": "accountAttribute"
},
"noStudentRegisterationCode"
]
},
"type": "firstValid"
},
"recordIndicator": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "RECORD_INDICATOR",
"sourceName": "RPG Student Banner Replica"
},
"type": "accountAttribute"
},
"noRecordIndicator"
]
},
"type": "firstValid"
},
"currentDate": {
"attributes": {
"input": {
"attributes": {
"expression": "now"
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"lifeCycle": {
"attributes": {
"values": [
{
"attributes": {
"name": "cloudLifecycleState"
},
"type": "identityAttribute"
},
{
"attributes": {
"value": "nolifeCycle"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"value": "#if($lifeCycle == 'inactive')#if($dateCheck.contains('Z'))$dateCheck#{else}$currentDate#end#if($recordIndicator == 'active' || !(($studentRegisterationCode =='NS') || ($studentRegisterationCode =='WD') || ($studentRegisterationCode =='WA')))#end#end"
},
"internal": false
}
Thanks,
Harish G