# Transform null problem

**URL:** <https://developer.sailpoint.com/discuss/t/transform-null-problem/183147>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, sailpoint-identity-security\
**Created:** [September 26, 2025, 9:57am UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147 "2025-09-26T09:57:57Z")\
**Posts on this page:** 5\
**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:** [September 26, 2025, 9:57am UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147/1 "2025-09-26T09:57:57Z")

</div>

Hi Team,

I have created one transform which is throwing error on attribute where I mapped, I understood that this is due to null problem , what if it is not getting the attribute value for termination date then it is returning error, Could you please help here how this can be handle, it should return N/A if there is no value present in termination date for the source. however this transform working fine for those having the termination date mapped from the source. would need your help to understand how we can solve this null error handling?

```auto
{
        "name": "Leaver-ServiceNowTicket",
        "type": "static",
        "attributes": {
            "ServiceNowLeaver": {
                "type": "dateCompare",
                "attributes": {
                    "firstDate": {
                        "type": "dateFormat",
                        "attributes": {
                            "input": {
                                "type": "dateMath",
                                "attributes": {
                                    "expression": "now"
                                }
                            },
                            "inputFormat": "yyyy-MM-dd'T'HH:mm",
                            "outputFormat": "ISO8601"
                        }
                    },
                    "secondDate": {
                        "type": "dateMath",
                        "attributes": {
                            "expression": "-2d",
                            "input": {
                                "type": "dateFormat",
                                "attributes": {
                                    "input": {
                                        "attributes": {
                                            "sourceName": "DEV",
                                            "attributeName": "Termination Date"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    "inputFormat": "yyyy-MM-dd",
                                    "outputFormat": "ISO8601"
                                }
                            }
                        }
                    },
                    "operator": "gte",
                    "positiveCondition": "true",
                    "negativeCondition": "false"
                }
            },
            "value": "#if($ServiceNowLeaver == 'true')true#{else}false#end"
        },
        "internal": false
    }

```

---

<div class="post-metadata">

**Author:** ![j\_place](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/j_place/32/19181_2.png) [@j\_place](https://developer.sailpoint.com/discuss/u/j_place)\
**Post date:** [September 26, 2025, 10:42am UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147/2 "2025-09-26T10:42:00Z")

</div>

Hi @LearningStar Wrap your Termination Date accountAttribute with a firstValid transform, with the second condition being a static date a long time in the future.

---

<div class="post-metadata">

**Author:** ![iamnithesh](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamnithesh/32/42445_2.png) [@iamnithesh](https://developer.sailpoint.com/discuss/u/iamnithesh)\
**Post date:** [September 26, 2025, 1:31pm UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147/4 "2025-09-26T13:31:49Z")

</div>

While response from @j_place provides the solution to the issue posted, I also wanted to add a point:  
You can use

`"expression": "now+2d"`

in the firstDate calculation thus avoiding additional dateMath for the secondDate

---

<div class="post-metadata">

**Author:** ![UjjwalJain](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ujjwaljain/32/24704_2.png) [@UjjwalJain](https://developer.sailpoint.com/discuss/u/UjjwalJain)\
**Post date:** [September 28, 2025, 8:41am UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147/5 "2025-09-28T08:41:14Z")

</div>

Hi @LearningStar ,

Please use a `firstValid` transform for the termination date attribute and define a static date in case the termination date is not found. Also, set `ignoreError` to true.

---

<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:** [November 27, 2025, 8:41am UTC](https://developer.sailpoint.com/discuss/t/transform-null-problem/183147/6 "2025-11-27T08:41:32Z")

</div>

Closed on November 27, 2025, 8:41am UTC

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