# Transform Query

**URL:** <https://developer.sailpoint.com/discuss/t/transform-query/199945>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud, attributes\
**Created:** [March 20, 2026, 6:29am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945 "2026-03-20T06:29:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 20, 2026, 6:29am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/1 "2026-03-20T06:29:10Z")

</div>

Hi Team,

We have one requirement to set the leaver notice date on the basis of leaver’s date (another identity attribute which is calculated further from another transform), actually if leaver date has 31.12.9999 ( dummy date to define no planned exit) then this transform evaluate value to null but if leaver date has another valid date other than 31.12.9999 then it should set current date with this transform and to ensure that the value of current date should not get changed on the daily basis of identity refresh. do we have anything in transform to support such implementation.

if leaver date has 31.12.9999 then notice date will be null

if leaver date has some valid date other than 31.12.9999 then it should set current date and once it set it doesn’t change on daily basis.  
Also the current Date will get now operation which will not same value tomorrow. This will change value tomorrow. Lets say Leaver Notice condition met today will set but tomorrow again it will change the value to tomorrow’s date. I have tried below transform to implement the logic but I am sure the value would change in future once this transform would evaluated

```

{  
“attributes”: {  
“endDate”: {  
“type”: “IdentityAttribute”,  
“attributes”: {  
“attributeName”: “terminatedDate”  
}  
},  
“statusFlag”: {  
“type”: “accountAttribute”,  
“attributes”: {  
“sourceName”: “SuccessFactors”,  
“attributeName”: “ITFlag”  
}  
},  
“currentDate”: {  
“type”: “dateFormat”,  
“attributes”: {  
“input”: {  
“type”: “dateMath”,  
“attributes”: {  
“expression”: “now”  
}  
},  
“inputFormat”: “yyyy-MM-dd’T’HH:mm”,  
“outputFormat”: “yyyy-MM-dd”  
}  
},  
“isDefaultDate”: {  
“type”: “conditional”,  
“attributes”: {  
“expression”: “$endDate eq ‘31.12.9999’”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”,  
“endDate”: “$endDate”  
}  
},  
“isNoneFlag”: {  
“type”: “conditional”,  
“attributes”: {  
“expression”: “$statusFlag eq none”,  
“positiveCondition”: “true”,  
“negativeCondition”: “false”,  
“statusFlag”: “$statusFlag”  
}  
},  
“value”: “#if($isDefaultDate == ‘false’ || $isNoneFlag == ‘true’)$currentDate#{else}null#end”  
},  
“type”: “static”,  
“name”: “Calculate Last Working Day Transform”  
}

```

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [March 20, 2026, 8:51am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/2 "2026-03-20T08:51:08Z")

</div>

Using a ‘static’ transform, wrapped in a ‘trim’ function will send a NULL value, if the output of static is ‘ ‘ (there’s a space in between the ‘s)

` ”value”: “……..#{elseif}($check = ‘31.12.9999’) #{else}#end”`

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 23, 2026, 5:50am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/4 "2026-03-23T05:50:21Z")

</div>

@iamnithesh @lampard08 Experts seeking your help on this, could you please suggest if this can be done via transforms or we need to implement rule only to solve this requirement.

---

<div class="post-metadata">

**Author:** ![rahulb635](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rahulb635](https://developer.sailpoint.com/discuss/u/rahulb635)\
**Post date:** [March 23, 2026, 5:55am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/5 "2026-03-23T05:55:17Z")

</div>

See if this works:

1. **IF** the attribute already has a value (it’s not null or empty), **KEEP** that existing value.
2. **ELSE IF** the leaver conditions are met (Leaver Date is valid), **SET** it to `now`.
3. **ELSE** , set it to `null`.

**Attribute Name:** Ensure `leaverNoticeDate` (in the `existingValue` section) matches the exact **Technical Name** of the identity attribute you are currently creating/editing.

`{`  
`“name”: “Leaver Notice Date Persistent Transform”,`  
`“type”: “static”,`  
`“attributes”: {`  
`“existingValue”: {`  
`“type”: “identityAttribute”,`  
`“attributes”: {`  
`“attributeName”: “leaverNoticeDate”`  
`}`  
`},`  
`“leaverDate”: {`  
`“type”: “identityAttribute”,`  
`“attributes”: {`  
`“attributeName”: “terminatedDate”`  
`}`  
`},`  
`“currentDate”: {`  
`“type”: “dateMath”,`  
`“attributes”: {`  
`“expression”: “now”,`  
`“outputFormat”: “yyyy-MM-dd”`  
`}`  
`},`  
`“value”: “#if($existingValue != $null && $existingValue != ‘null’ && $existingValue != ‘’)$existingValue#elseif($leaverDate != ‘31.12.9999’ && $leaverDate != $null)$currentDate#{else}null#end”`  
`},`  
`“internal”: false`  
`}`

Do check date formats and change as per your convenience.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 23, 2026, 8:33am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/6 "2026-03-23T08:33:05Z")

</div>

Hi Rahul, Will it be changed on daily basis let suppose if my leaver date has some other date 31.12.9999 my notice date would be changed to current date as per the transform 2026-03-23 will it be 2026-03-24 tomorrow 2026-03-25 and so on. if yes then it should not be updated on daily basis

---

<div class="post-metadata">

**Author:** ![ssowmya567](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ssowmya567/32/30945_2.png) [@ssowmya567](https://developer.sailpoint.com/discuss/u/ssowmya567)\
**Post date:** [March 23, 2026, 8:47am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/7 "2026-03-23T08:47:33Z")

</div>

@LearningStar As per Rahul’s logic, it should not change. Because in his transform, it is mentioned that if existing value is not equal to null then it retains the existing value and the existing value is calculated from LeaverNoticeDate identity attribute. Did you try it?

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 23, 2026, 9:05am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/8 "2026-03-23T09:05:52Z")

</div>

Hey, I don’t have access to any tenant right now, its still in discovery phase, and one thing if this transform can retain the previous value then I think it should be good

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [March 23, 2026, 9:12am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/9 "2026-03-23T09:12:44Z")

</div>

Curious to know how you tested the transform in your problem statement if you don’t have access to a tenant

---

<div class="post-metadata">

**Author:** ![rahulb635](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rahulb635](https://developer.sailpoint.com/discuss/u/rahulb635)\
**Post date:** [March 23, 2026, 10:53am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/10 "2026-03-23T10:53:21Z")

</div>

It will be same. Thank you Sowmya for pointing it out.

---

<div class="post-metadata">

**Author:** ![lampard08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/lampard08/32/32646_2.png) [@lampard08](https://developer.sailpoint.com/discuss/u/lampard08)\
**Post date:** [March 23, 2026, 11:46am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/11 "2026-03-23T11:46:35Z")

</div>

there could be an other way of doing this. where are you getting this date from? from transform i see you are getting an account attribute from successfactors. does success factors also send this end date? if so you can consider using that date directly successfactors. the above transform works but in case of rehire or similar, i assume your date needs to reflect what you are getting from source.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 24, 2026, 6:48am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/12 "2026-03-24T06:48:12Z")

</div>

Thanks @rahulb635🙂

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 24, 2026, 6:51am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/13 "2026-03-24T06:51:09Z")

</div>

Hi @lampard08 we are getting this from terminated date which is also coming via another transform on the basis of two attributes (last working day , end date) whichever is available we are using it on leaver date, and further this leaver date we are using to derived the notice date. this is the entire flow.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 26, 2026, 6:18am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/14 "2026-03-26T06:18:56Z")

</div>

Hi @rahulb635 This transform would result in appending the current date as per the current implementation , do we have any way to restrict it from appending the current date if it set once.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [March 26, 2026, 11:37am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/15 "2026-03-26T11:37:38Z")

</div>

Hi @rahulb635 @lampard08

I m still stuck on this transform would appreciate your help if you guys can suggest what is wrong here as I tried so many combinations but none of them is working, filter condition is the main issue what I understood from transform.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/5/0/50b61ab70ee7c0e6e3459589d3feca3fbe3c6a8a.png)

---

<div class="post-metadata">

**Author:** ![lampard08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/lampard08/32/32646_2.png) [@lampard08](https://developer.sailpoint.com/discuss/u/lampard08)\
**Post date:** [March 26, 2026, 2:58pm UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/16 "2026-03-26T14:58:09Z")

</div>

@LearningStar : post your final transform.

---

<div class="post-metadata">

**Author:** ![rahulb635](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rahulb635](https://developer.sailpoint.com/discuss/u/rahulb635)\
**Post date:** [April 2, 2026, 6:19am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/17 "2026-04-02T06:19:18Z")

</div>

I am assuming it is due to the way NULL is treated in sailpoint. Try this.

> {  
> “name”: “Leaver Notice Date Persistent Transform”,  
> “type”: “static”,  
> “attributes”: {  
> “existingValue”: {  
> “type”: “identityAttribute”,  
> “attributes”: {  
> “attributeName”: “leaverNoticeDate”  
> }  
> },  
> “leaverDate”: {  
> “type”: “identityAttribute”,  
> “attributes”: {  
> “attributeName”: “terminatedDate”  
> }  
> },  
> “currentDate”: {  
> “type”: “dateMath”,  
> “attributes”: {  
> “expression”: “now”,  
> “outputFormat”: “yyyy-MM-dd”  
> }  
> },  
> “value”: “#if($existingValue && $existingValue != ‘null’ && $existingValue != ‘ ‘)$existingValue#elseif($leaverDate && $leaverDate != ‘31.12.9999’ && $leaverDate != ‘null’)$currentDate#{else}none#end”  
> },  
> “internal”: false  
> }

Make sure n the velocity template this space between is there in the following && $existingValue != ‘ ‘)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [June 1, 2026, 6:19am UTC](https://developer.sailpoint.com/discuss/t/transform-query/199945/18 "2026-06-01T06:19:51Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
