
Preprocess CSVA.76341 (Customer) asked a question.
Expression language : null values
Hi,
I'm trying to push an expiration date from Okta to Active Directory.
The date is not always defined as only temp contracts or trainnee have this field set in Okta.
I would like to only push values into the "AccountExpires" field when a date is set in the "EndDate" filed in Okta.
So far I've come up with :
user.endDate != null ? Time.fromIso8601ToWindows(Time.fromStringToIso8601(user.endDate,"dd/MM/YYYY")) : null
But this return an syntax error. However this is working :
user.endDate != "" ? Time.fromIso8601ToWindows(Time.fromStringToIso8601(user.endDate,"dd/MM/YYYY")) : ""
But will push "" in the AccountExpires field in ActiveDrectory when the source field is null.
What am I missing here ?

Hi,
I've tested both expressions in my environment and both work. As this would require us to further investigate your Okta tenant, I would recommend that you open a proper Support Ticket by either opening one from the Support Portal or by reaching out to us at: (800) 219-0964
Thank You,
Liviu Scarlat
Technical Support Engineer
Okta Global Customer Care
Hi,
Thanks for your reply. I'll do that.
Have a nice day,
Fabien