Nested if statements Skip to main content
https://support.okta.com/help/answers?id=9062a000000dfjxqaw&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Jeff RiedlingJeff Riedling 

Nested if statements

In Okta profile editor mappings is their a way to do nested if statements and how long can the map be?
Best Answer chosen by Jeff Riedling
Nicole DotyNicole Doty
We have it working in our environment for branded emails @ creation from workday.  We take the workday "brand" and use that to determine the email & login suffix. Here's some sample code:
appuser.Brand == "BRAND1" ? appuser.firstName + "." + appuser.lastName + "@BRAND1.com":appuser.Brand == "BRAND2" ? appuser.firstName + "." + appuser.lastName + "@brand2.com":appuser.firstName + "." + appuser.lastName + "@default.com"

All Answers

Nicole DotyNicole Doty
We have it working in our environment for branded emails @ creation from workday.  We take the workday "brand" and use that to determine the email & login suffix. Here's some sample code:
appuser.Brand == "BRAND1" ? appuser.firstName + "." + appuser.lastName + "@BRAND1.com":appuser.Brand == "BRAND2" ? appuser.firstName + "." + appuser.lastName + "@brand2.com":appuser.firstName + "." + appuser.lastName + "@default.com"
This was selected as the best answer
Dylann FezeuDylann Fezeu (Customer First Programs)
Hello,

Thanks for posting your inquiry in Okta Community Portal.

​If you receive a great answer to your question(s), please help readers find it by marking it the best answer. Hover over the answer and click "Best Answer." 

Thank you,

​Dylann Fezeu
OHC Team