Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Need Information regarding how to use does not contain or like or starts with in email body

sk
Regular Contributor
Regular Contributor

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 

 

2 REPLIES 2

adriencosson
Valued Contributor
Valued Contributor

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 !

Regards,
Adrien COSSON

rushikeshvartak
All-Star
All-Star

All strings java method can be used


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.