# Null value handling with transform

**URL:** <https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, sailpoint-identity-security\
**Created:** [July 13, 2023, 11:05pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453 "2023-07-13T23:05:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeg](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mikeg](https://developer.sailpoint.com/discuss/u/mikeg)\
**Post date:** [July 13, 2023, 11:05pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/1 "2023-07-13T23:05:54Z")

</div>

Hello,  
Have the following use case: terminated users are assigned a bogus email, otherwise use the existing manager. This works fine except for the CEO who does not have a manager. I created an identity attribute called managerEmailForTransform which holds the manager email from the auth source. Also tried referencing the account attribute for manager email and in both cases the transform fails for the CEO. Hoping someone can help out with this. Thanks!

{  
“id”: “992c8d1a-dfac-41f1-80cc-e78e27db0bcd”,  
“name”: “GetManagerEmail\_tst”,  
“type”: “static”,  
“attributes”: {  
“ignoreErrors”: “true”,  
“status”: {  
“attributes”: {  
“sourceName”: “AuthSource”,  
“attributeName”: “status”  
},  
“type”: “accountAttribute”  
},  
“manager”: {  
“attributes”: {  
“values”: [  
{  
“type”: “rule”,  
“attributes”: {  
“name”: “Cloud Services Deployment Utility”,  
“operation”: “getReferenceIdentityAttribute”,  
“uid”: “manager”,  
“attributeName”: “email”  
},  
“ignoreErrors”: “true”  
},  
{  
“type”: “identityAttribute”,  
“attributes”: {  
“name”: “managerEmailForTransform”  
}  
}  
]  
},  
“ignoreErrors”: “true”,  
“type”: “firstValid”  
},  
“value”: “#if($status==‘Inactive’)disabled-user-manager@abc.onmicrosoft.com#{else}$manager#{end}”  
},  
“internal”: false  
}

---

<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:** [July 13, 2023, 11:30pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/2 "2023-07-13T23:30:34Z")

</div>

What value do you want the transform to return for CEO?

---

<div class="post-metadata">

**Author:** ![mikeg](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mikeg](https://developer.sailpoint.com/discuss/u/mikeg)\
**Post date:** [July 13, 2023, 11:43pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/3 "2023-07-13T23:43:41Z")

</div>

Hi Nithesh. Need the value to remain null/empty as it’s empty in the auth source. Thanks!

---

<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:** [July 14, 2023, 12:27am UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/4 "2023-07-14T00:27:27Z")

</div>

> [@mikeg](#):
>
> ReferenceIdentityAttribute

Give this a try

```auto
    "type": "static",
    "attributes": {
        "ignoreErrors": "true",
		"value": "#if($status=='Inactive')disabled-user-manager@abc.onmicrosoft.com#{elseif}($manager != \"NM\")$manager#{end}",
		"status": {
            "type": "accountAttribute",			
            "attributes": {
                "attributeName": "status",
                "sourceName": "AuthSource"
            }
        },
        "manager": {
            "type": "firstValid",
            "attributes": {
                "values": [
                    {
                        "type": "rule",
                        "attributes": {
                            "attributeName": "email",
                            "name": "Cloud Services Deployment Utility",
                            "operation": "getReferenceIdentityAttribute",
                            "uid": "manager"
                        },
                        "ignoreErrors": "true"
                    },
                    {
                        "type": "static",
                        "attributes": {
                            "value": "NM"
                        }
                    }
                ]
            },
            "ignoreErrors": "true"
        }
    }

```

---

<div class="post-metadata">

**Author:** ![mikeg](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mikeg](https://developer.sailpoint.com/discuss/u/mikeg)\
**Post date:** [July 14, 2023, 4:23pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/5 "2023-07-14T16:23:38Z")

</div>

This works perfect. Thank you!

---

<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:** [September 12, 2023, 4:24pm UTC](https://developer.sailpoint.com/discuss/t/null-value-handling-with-transform/14453/6 "2023-09-12T16:24:27Z")

</div>

Closed on September 12, 2023, 4:24pm UTC

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