Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Email Templates - else part is not working in CC

IAM_99
Regular Contributor II
Regular Contributor II

Hi Team , We have below condtion in email template - CC 

<% if(null!=user?.secondaryManager.email && user?.secondaryManager.email!='') print "${user?.secondaryManager.email}" else print "${manager.email}" %>

if block works and prints secondary email but else part doesnt work , any idea ?

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

manager?.email

does manager email print work in email body


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

IAM_99
Regular Contributor II
Regular Contributor II

no its not working in body also. it looks like else is not getting evaluated.

<% if(null==user?.secondaryManager.email || user?.secondaryManager.email=='') print "hello" else if  print "${user?.secondaryManager.email}" %>

 

Else if works?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

IAM_99
Regular Contributor II
Regular Contributor II

tried that as well, no luck

IAM_99
Regular Contributor II
Regular Contributor II

Can we use sql queries in email templates ? or any other way of expressions ?

No sqls


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sk
All-Star
All-Star

Try below

<% if (user.secondaryManager) print "${user.secondaryManager.email}" else print "${manager.email}" %>


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.