
v0xxc (v0xxc) asked a question.
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

Did you try:
String.stringContains(user.lastName, "nn")
Ouch, I haven't considered that. Too used to SQL these days.
The lastName works fine, thank you. 😊