<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
0D51Y00008ch3qUSAQOkta Classic EngineAdministrationAnswered2024-08-23T09:00:29.000Z2020-06-02T14:58:29.000Z2020-06-03T06:37:54.000Z

v0xxc (v0xxc) asked a question.

Expression language usage of String.stringContains

Dear all,

 

I've set up a group and a simple rule, worked.

 

Then I got curious how much I can do with the expression language. Dug a bit through the linked documentation and then thought I would like to have a filter on all lastnames containing a double-nn (doesnt make sense, but just some understanding as objective).

 

Switching to expression language and adding one more condition:

user.division == "0123" AND 

user.userType == "0003"

Worked.

 

Adding a string operation:

user.division == "0123" AND 

user.userType == "0003" AND 

String.stringContains(user.lastname, "nn")

Fails.

 

So, how to use the String.stringContains properly?

I tried with and without ==, always got "invalid expression". The linked docu states that stringContains returns a boolean, so the == shouldn't be needed. Yet, that doesnt seem to be the case. Am I missing something?

I dont think the "?:" operator will help me there either, or does it?

 

Kind regards

 

Dominik Trui


  • v0xxc (v0xxc)

    Ouch, I haven't considered that. Too used to SQL these days.

     

    The lastName works fine, thank you. 😊

This question is closed.
Loading
Expression language usage of String.stringContains