Null value handling with transform

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’)[email protected]#{else}$manager#{end}”
},
“internal”: false
}

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

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

Give this a try

    "type": "static",
    "attributes": {
        "ignoreErrors": "true",
		"value": "#if($status=='Inactive')[email protected]#{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"
        }
    }
1 Like

This works perfect. Thank you!

1 Like

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