Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/09/2024 01:19 AM
Hi,
We have a requirement of displaying entitlement details in email when entitlement is requested and role details when roles is requested and both if both are requested, for fetching the entitlement details we are fetching entitlementshtmltablerows and for roles we are using rolesshtmltablerows.
How to use if condition so that it checks if entitlementshtmltablerows is not null only then the entitlement details are displayed and similarly if rolesshtmltablerows is not null only then role details table is displayed.
I tried with the below query but when I click on save it gives a pop up saying 'Could not save as script is used'.
<if (entitlementshtmltablerows!=NULL) <table border=1 cellpadding=0 cellspacing=0 style=font-family: Poppins Light> <tr> <th>Application</th> <th> Groups </th> <th> Description </th> <th> Glossary </th> </tr> ${entitlementshtmltablerows}</table> %>
09/09/2024 02:09 AM
Hi Isha,
I am able to save above script. You can try saving same in the new email template. Roles details you can fetch using 'rolesshtmltablerows'.
09/09/2024 03:41 AM
Hi , I was able to add it in Email body as below:
09/09/2024 03:52 AM
@Isha don't have to add null condition if entitlement doesn't exist it won't print.
09/09/2024 04:02 AM
09/09/2024 05:40 AM
Use below code
<div> <%if(entitlementshtmltablerowsv3=='') { %> </div> <% } else { %>
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;'></p> <br>
<table style="width:90%; margin-left: 20px; background-color: #E8E5E1;">
<tr style="text-align: left;background-color: #E8E5E1;">
<th style="background: rgb(255, 192, 0);vertical-align: top;">
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:7.2pt;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;text-align:center;'><strong><span style='font-size:13px;font-family:"Verdana",sans-serif;color:black;'>Application</span></strong></p>
</th>
<th style="background: rgb(255, 192, 0);vertical-align: top;">
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:7.2pt;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;text-align:center;'><strong><span style='font-size:13px;font-family:"Verdana",sans-serif;color:black;'>Entitlement</span></strong></p>
</th>
<th style="background: rgb(255, 192, 0);vertical-align: top;">
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:7.2pt;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;text-align:center;'><strong><span style='font-size:13px;font-family:"Verdana",sans-serif;color:black;'>Entitlement Description</span></strong></p>
</th>
<th style="background: rgb(255, 192, 0);vertical-align: top;">
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:7.2pt;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;text-align:center;'><strong><span style='font-size:13px;font-family:"Verdana",sans-serif;color:black;'>Display Name</span></strong></p>
</th>
<th style="background: rgb(255, 192, 0);vertical-align: top;">
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:7.2pt;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;text-align:center;'><strong><span style='font-size:13px;font-family:"Verdana",sans-serif;color:black;'>Business Justification</span></strong></p>
</th>
</tr> ${entitlementshtmltablerowsv3}
</table><% }%><br><br>