Hi,
Is it possible to add an @If statement in a table in a notification mail.
It keeps disappearing when I put one in?!
Kind Regards,
Rudi
Hi,
Is it possible to add an @If statement in a table in a notification mail.
It keeps disappearing when I put one in?!
Kind Regards,
Rudi
Best answer by alin.lupascu
The initial code it’s correct if you only want to display that section however the editor is changing the rendering when pasted in sysaid - unfortunately I do not have a solution for this yet.
My recommendation is to have variables outside the table - you can take the default Template and change it to your liking.
<!DOCTYPE html><html><head/><body>
<div style="background-color: #f8f8f8;"><br /><br /><br />
<table style="border-collapse: collapse; width: 700px; height: auto; background-color: #ffffff; border-style: none; margin-left: auto; margin-right: auto;">
<tbody>
<tr style="height: 27px;">
<td style="background-color: #00b074; height: 58px; width: 1694px;" colspan="6">
<p style="text-align: center;"><span style="font-size: 18pt; color: #ffffff;"> Service Desk Notification</span></p>
</td>
</tr>
<tr style="height: 40px;">
<td style="width: 187px; height: 80px;"> </td>
<td style="height: 80px; width: 1357px;" colspan="4"><span style="font-size: 12pt;"> <strong style="color: #787993;">Hi ${ReqUser.FirstName},</strong> <br /></span><span style="font-size: 12pt;"> <strong style="color: #787993;">Here are the details regarding ${ServiceRecordType} <span style="color: #0645ad; font-size: 12pt;"><a style="color: #0645ad;" title="#${ID} - ${Title}" href="${SelfServicePortalURL}/servicePortal/SRview/${ID}">#${ID}</a></span> you submitted:</strong></span></td>
<td style="width: 150px; height: 80px;"> </td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 21px;"> </td>
<td style="width: 1357px; height: 21px;" colspan="4"><span style="text-decoration: underline; font-size: 14pt;"><strong style="color: #787993; text-decoration: underline;">${Title}</strong> </span></td>
<td style="width: 150px; height: 21px;"> </td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 25px;"> </td>
<td style="width: 318px; height: 25px;"><span style="color: #787993; font-size: 12pt;"> <strong>Admin group</strong> </span></td>
<td style="width: 358px; height: 25px;"><span style="color: #787993; font-size: 12pt;">${AssignedGroup}</span></td>
<td style="width: 325px; height: 25px;"><span style="color: #787993; font-size: 12pt;"> <strong>Status</strong> </span></td>
<td style="width: 356px; height: 25px;"><span style="color: #787993; font-size: 12pt;">${Status}</span></td>
<td style="width: 150px; height: 25px;"><span style="color: #787993; font-size: 12pt;"><strong> </strong></span></td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 10px;"> </td>
<td style="width: 318px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Assigned to</strong> </span></td>
<td style="width: 358px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${AssignedTo}</span></td>
<td style="width: 325px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Priority</strong> </span></td>
<td style="width: 356px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${Priority}</span></td>
<td style="width: 150px; height: 10px;"><span style="color: #787993; font-size: 12pt;"><strong> </strong></span></td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 10px;"> </td>
<td style="width: 318px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Request user</strong> </span></td>
<td style="width: 358px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${RequestUser}</span></td>
<td style="width: 325px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Urgency</strong> </span></td>
<td style="width: 356px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${Urgency}</span></td>
<td style="width: 150px; height: 10px;"><span style="color: #787993; font-size: 12pt;"><strong> </strong></span></td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 10px;"> </td>
<td style="width: 318px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Request time</strong> </span></td>
<td style="width: 358px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${SubmitTime}</span></td>
<td style="width: 325px; height: 10px;"><span style="color: #787993; font-size: 12pt;"> <strong>Category</strong> </span></td>
<td style="width: 356px; height: 10px;"><span style="color: #787993; font-size: 12pt;">${Category}</span></td>
<td style="width: 150px; height: 10px;"><span style="color: #787993; font-size: 12pt;"><strong> </strong></span></td>
</tr>
<tr style="height: 21px;">
<td style="width: 187px; height: 13px;"> </td>
<td style="width: 318px; height: 13px;"><span style="color: #787993; font-size: 12pt;"> <strong>Submit user</strong> </span></td>
<td style="width: 358px; height: 13px;"><span style="color: #787993; font-size: 12pt;">${SubmitUser}</span></td>
<td style="width: 325px; height: 13px;"><span style="color: #787993; font-size: 12pt;"> <strong>Sub category</strong> </span></td>
<td style="width: 356px; height: 13px;"><span style="color: #787993; font-size: 12pt;">${SubCategory}</span></td>
<td style="width: 150px; height: 13px;"><span style="color: #787993; font-size: 12pt;"><strong> </strong></span></td>
</tr>
<tr style="border-style: none; height: auto;">
<td style="width: 187px; height: auto;"> </td>
<td style="width: 1357px; height: auto;" colspan="4">
<p style="line-height: 1.5;"><span style="color: #787993; font-size: 12pt;"> <strong style="color: #787993;">Description</strong> <br />${Description}</span></p>
<p style="line-height: 1;">#if( ${Solution} && ${Solution}!="" )<span style="color: #787993; font-size: 12pt;"><strong>Solution</strong> </span></p>
<p style="line-height: 1;"><span style="color: #787993; font-size: 12pt;">${Solution}</span>#end <br />#if(${isClosedSR}==true && ${LinkToSurvey} && ${LinkToSurvey}!="" )<span style="color: #787993; font-size: 12pt;"><strong>Please fill out this Survey: </strong> ${LinkToSurvey}</span>#end</p>
<p>#if(${isClosedSR}==true && ${ReopenSR}!="0" )<span style="color: #787993;"><span style="font-size: 12pt;"><strong>Click here if you would like to reopen this service record: </strong></span> </span><span style="color: #787993;"><span style="font-size: 12pt;">${ReopenSR}</span></span>#end</p>
<br />#if( ${IsNewSr}==true && ${AfterHours} && ${AfterHours}==true)
<p><span style="color: #787993; font-size: 12pt;"><strong style="color: #787993;">Helpdesk Operating Times</strong> </span> <br /><span style="color: #e03e2d; font-size: 12pt;"><strong>The Helpdesk is not active at the moment, your service record will be addressed during working hours.</strong></span> <br /><span style="font-size: 12pt; color: #787993;">$OperatingTimesTable</span>#elseif (${IsNewSr}==true) <br /><span style="color: #787993; font-size: 12pt;"><strong style="color: #787993;">Helpdesk Operating Times</strong> <br /></span><span style="font-size: 12pt; color: #787993;">$OperatingTimesTable</span></p>
<br />#end</td>
<td style="width: 150px; height: auto;">
<p><span style="color: #787993;"><span style="font-size: 14pt;"><strong> </strong></span></span></p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: center;"><span style="font-size: 10pt;"> <span style="color: #95a5a6;">Help Desk Software by</span> <span style="color: #0645ad;"> <a style="color: #0645ad;" href="${SelfServicePortalURL}" target="_blank" rel="noopener">SysAid</a> </span> </span></p>
<table class="sysaidEditNotificationTable" style="border-collapse: collapse; width: 100%; border-style: none;" border="0">
<tbody>
<tr>
<td style="width: 98.3558%; border-style: none;"> </td>
</tr>
</tbody>
</table>
</div>
</body></html>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.