<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
0D51Y00008pb5uZSAQOkta Classic EngineOkta Integration NetworkAnswered2025-10-26T09:00:43.000Z2020-06-25T08:56:57.000Z2020-06-25T09:19:37.000Z

xeis3 (xeis3) asked a question.

How to append middleName, only if this is not empty, to lastname?

For a mapping to an app I want to append the middle name and the lastname, but only if the middle name is not empty.

But I keep getting the error: Invalid expression syntax

What is wrong with:

(String.len(user.middleName) == 0 ? (user.lastName) : (user.middleName + " " + user.lastName)


  • xeis3 (xeis3)

    Just found it myself; no error with:

    user.middleName != "" ? (user.middleName + " " + user.lastName) : (user.lastName)

     

     

  • xeis3 (xeis3)

    Correction, it should be

    user.middleName != null ? (user.middleName + " " + user.lastName) : (user.lastName)

     

    Now I got my mapping right, but how can I let Okta show users with their middle names?

    (Like in the Directory, and any other person fields.)

    Expand Post
This question is closed.
Loading
How to append middleName, only if this is not empty, to lastname?