Sending null value in create account attribute

Hi all,

May I know if there is any way for us to push null value in the create account attribute? It is to create mail attribute. If the mailNickname is not null, it will concat the mailNickname & @testing.com. If the mailNickname is null, it will be pushing the β€œ.”. We would like to push the null value. But pushing null value is not feasible by both UI and transform rule.

Please share your thoughts if you have encountered similar cases. Thank you so much.

Here is the existing transform that we are using:

{
    "name": "mail",
    "transform": {
        "type": "conditional",
        "attributes": {
            "expression": "$prefix eq '.'",
            "positiveCondition": "$prefix",
            "negativeCondition": "$prefix$suffix",
            "prefix": {
                "type": "firstValid",
                "attributes": {
                    "values": [
                        {
                            "attributes": {
                                "value": "$mailNickname"
                            },
                            "type": "static"
                        },
                        "."
                    ]
                }
            },
            "suffix": {
                "attributes": {
                    "value": "@testing.com"
                },
                "type": "static"
            }
        }
    },
    "attributes": {},
    "isRequired": false,
    "type": "string",
    "isMultiValued": false
}

Hi @iris_deloitte ,
Try Using static transform

{
        "name": "mail",
        "transform": {
            "type": "static",
            "attributes": {
                "prefix": {
                    "type": "firstValid",
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "value": "$mailNickname"
                                },
                                "type": "static"
                            },
                            "null"
                        ]
                    }
                },
                "suffix": {
                    "attributes": {
                        "value": "@testing.com"
                    },
                    "type": "static"
                },
                "value": "#if($prefix!='null')$prefix$suffix#end"
            }
        },
        "attributes": {},
        "isRequired": false,
        "type": "string",
        "isMultiValued": false
    }

Thanks!!

In this way if your mailNickname is not null then your mail value will be [email protected] if maiNickname is empty then mail value will also be empty

Hi Naveen,

Thank you so much! It works.

I have a further question. The field is shown as static. If I update other fields with UI, backend prefix & suffix will be overwrite and it leads to an error that the static transform can’t read the value of prefix and suffix. May I know if you have encountered this kind of situation before?

Hi Iris,
It’s a bug. If you make any changes in the create profile it will change the policy so to overcome this issue you have to again change policy with api.Refer this post for it:

1 Like

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