Initcap transform

Hey guys!

We need a transform to convert a user’s first name, last name, and display name to Initcap.

We tried using a name normalizer transform, but we found out that some functionalities don’t meet our needs, as in this one:

For example, there is a user with the surname “Macedo”, but the transform converts it to “MacEdo”.

Do you guys know a way to create a similar transform, but without some of the functionalities?

Hello @Caio_Nakayama,

The requirement is to capitalize first letter from firstname/lastname/displayname and rest of the letters to be in lowercase. If I understood it correctly?

You can use below transform:

{

    "id": "62b8f8be",

    "name": "Initcap_Transform",

    "type": "concat",

    "attributes": {

        "values": [

            {

                "type": "upper",

                "attributes": {

                    "input": {

                        "type": "substring",

                        "attributes": {

                            "begin": 0,

                            "end": 1,

                            "input": {

                                "type": "accountAttribute",

                                "attributes": {

                                    "sourceName": "Oracle HCM",

                                    "attributeName": "FirstName"

                                }

                            }

                        }

                    }

                }

            },

            {

                "type": "lower",

                "attributes": {

                    "input": {

                        "type": "substring",

                        "attributes": {

                            "begin": 1, //note: here I haven’t given “end”, as by default it will take the whole string

                            "input": {

                                "type": "accountAttribute",

                                "attributes": {

                                    "sourceName": "Oracle HCM",

                                    "attributeName": "FirstName"

                                }

                            }

                        }

                    }

                }

            }

        ]

    },

    "internal": false

}


You can apply the same transform for lastname and displayname as well.

Hey Caio,

Try this transform, there’s an embedded rule in all tenants called Cloud Services Deployment Utility that has some operations, one of them is normalizeName, and in this case you can add a couple of patterns you wish to correct from the normal transform. We used this transform for this exact “Macedo” situation and it turned out like this:
{
“name”: “NormalizeDisplayName”,
“type”: “rule”,
“attributes”: {
“name”: “Cloud Services Deployment Utility”,
“operation”: “normalizeName”,
“delimiters”: [
" ",
“-”
],
“patterns”: “\b(Mac)”,
“replacements”: {
“\b(?:MacA)”: “Maca”,
“\b(?:MacB)”: “Macb”,
“\b(?:MacC)”: “Macc”,
“\b(?:MacD)”: “Macd”,
“\b(?:MacE)”: “Mace”,
“\b(?:MacF)”: “Macf”,
“\b(?:MacG)”: “Macg”,
“\b(?:MacH)”: “Mach”,
“\b(?:MacI)”: “Maci”,
“\b(?:MacJ)”: “Macj”,
“\b(?:MacK)”: “Mack”,
“\b(?:MacL)”: “Macl”,
“\b(?:MacM)”: “Macm”,
“\b(?:MacN)”: “Macn”,
“\b(?:MacO)”: “Maco”,
“\b(?:MacP)”: “Macp”,
“\b(?:MacQ)”: “Macq”,
“\b(?:MacR)”: “Macr”,
“\b(?:MacS)”: “Macs”,
“\b(?:MacT)”: “Mact”,
“\b(?:MacU)”: “Macu”,
“\b(?:MacV)”: “Macv”,
“\b(?:MacW)”: “Macw”,
“\b(?:MacX)”: “Macx”,
“\b(?:MacY)”: “Macy”,
“\b(?:MacZ)”: “Macz”
}
},
“internal”: false
}

Hi @Caio_Nakayama,

You can use the Name Normalizer transform for this use case. For more details, refer to the SailPoint documentation: