
JeffS.13152 (Customer) asked a question.
Hello!
I've done a little bit of research and found that the Time function was not supported in conditional expressions, however I am hoping this is only a restraint of classic engine. The OIE documentation does not indicate that Time is not supported and I am currently also using arrays in conditional expressions which was also an unsupported function for conditions in classic engine.
With that said, is there a proper expression that can be used to map a custom value if the user's hire date is within the last 60 days? for example:
appuser.hireDate <= Time.now().minusDays(60) ? "New Hire" : ""
It appears the Time.now().minusDays(60) returns an invalid property error in the preview. I can get the full ISO 8601 time if I just use Time.now(), but it will not let me use the minus days function even though it is outlined in the Expression Language documentation. Any ideas? Any help is greatly appreciated!
Thank you!
Jeff

Hi, @JeffS.13152 (Customer)
Thank you for posting on our Community page!
This is not achievable via Expression language, however, it can be achieved with Workflows.
Here is more info on the Time functions in expression language: https://developer.okta.com/docs/reference/okta-expression-language-in-identity-engine/#time-functions
Thank you for reaching out to our Community and have a great day!
_____________________________________________________________________________
Community members help others by clicking Like or Select as Best on responses. Try it today.
_____________________________________________________________________________