<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
0D50Z00008G7UtMSAVOkta Classic EngineAdministrationAnswered2024-04-16T10:07:28.000Z2017-04-19T22:46:33.000Z2018-08-23T20:05:49.000Z
Okta Expression Language, String Comparison
http://developer.okta.com/reference/okta_expression_language/index

 

I am using the Okta Expression Language in an attempting to test if users last name is in A-L or M-Z and put them into a group based on that test -- (that is the simplified test)

 

As I look through the documentation, **STRING** expressions do not appear to include the operators <, >, <=, and >=.

 

Here are the test that I know work

 

Test users last name: A-L

Arrays.contains({"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}, user.CustomVariable_LastName_CharSplit))

Arrays.contains({"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}, user.CustomVariable_LastName_CharSplit)) == true

 

Test users last name: M-Z

Arrays.contains({"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}, user.CustomVariable_LastName_CharSplit)) == false

Arrays.contains({"M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}, user.CustomVariable_LastName_CharSplit)

 

user.CustomVariable_LastName_CharSplit contains only the capitalized letter of their last name.

 

Is there an easier way to perform a conditional test of the user's last name to split them off into different groups?

 

Thank you,

 

W.


This question is closed.
Loading
Okta Expression Language, String Comparison