Okta Expressions - IF/Than/Else - Populating Mobile Number into Active Directory from Workday
Hi all, I'm new to Okta's expression language and I'm trying to work out an issue I'm having with a new project initiative involving automating signatures via Mimecast (mail going out) and Office 365 (internal mail only).
I'm trying to pull the mobile number value from Workday (our HR system) into AD attribute customAttribute15, but i'd like to have the word "Mobile" appear before the phone number, if it exists. If it does not exist then I'd like to return nothing.
Example: workday.mobilePhone = 555-555-5555
This is what I have so far: String.len(workday.mobilePhone) > 0 ? String.join("Mobile", + workday.mobilePhone) : null
My thought process on this was that if the variable length is greater than no characters, then add "Mobile" and the phone number pulled from Workday. Otherwise return nothing.
I keep getting the error "Error in Evaluating Expression", but I believe it works for users that do not have a mobile number populated.