<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00007cuE9LSAUOkta Classic EngineAdministrationAnswered2024-04-15T12:50:30.000Z2020-01-24T06:29:54.000Z2020-02-10T07:03:42.000Z

i9l8o (i9l8o) asked a question.

Normalize attribute using Expression Language

Has anyone been able to normalize an attribute to proper "format" using Expression Language? We've had instances where an employee's name is either all lower case or all upper case. Would like to force "Proper Case" when provisioning accounts to applications or AD.

 

Any suggestions/examples would be great.

 

Thank you!

 

https://developer.okta.com/docs/reference/okta-expression-language/*string-functions


  • i9l8o (i9l8o)

    Via trial and error, I came up with the following. This is assuming that the first and last name are all UPPERCASE.

     

    appuser.firstName == String.toUpperCase(appuser.firstName) ? String.substring(appuser.firstName, 0, 1) + String.toLowerCase(String.substring(appuser.firstName, 1, String.len(appuser.firstName))) : appuser.firstName

     

     

    appuser.lastName == String.toUpperCase(appuser.lastName) ? String.substring(appuser.lastName, 0, 1) + String.toLowerCase(String.substring(appuser.lastName, 1, String.len(appuser.lastName))) : appuser.lastName

    Expand Post
This question is closed.
Loading
Normalize attribute using Expression Language