Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/06/2024 01:18 AM
Hi Team,
Can someone please help to get the syntax for how to use does not contain or starts with or like in email body while using if else condition.
Currently we are using analytics binding variables like ${ANALYTICSDATA.'User Location'[0]}
<% if({ANALYTICSDATA.'User Location'[0]}.contains('US')) print "ABC" else print "" %>
Not exactly if even above statement was correct similarly I do require does not contain or like or starts with in if else condition.
Regards,
Sai Krishna
06/06/2024 02:09 AM
Hi @sk,
Usually the nomenclature for using contains() to compare a list and a specific value method is the following :
['US','FR','BE','UK'].contains(ANALYTICSDATA.'User Location'[0])
Then just add an exclamation mark at the very beginning for "Does not contain" use case.
Sample for contains() using strings :
ANALYTICSDATA.'User Location'[0].toString().contains('US')
Sample for Startswith (if working with strings only) :
ANALYTICSDATA.'User Location'[0].toString().startsWith('US')
Hope this helps !
06/06/2024 01:13 PM
All strings java method can be used