Hello,
Would someone kindly be able to assist me in creating an HTML If statement for an Email Template. I am used to creating them in Report Designer, and not in the HTML of an email template. I have tried using the Acumatica AI, but still no luck. This template goes out when a Shipment is Confirmed, and I have a table for the Tracking Numbers.
I would like the statement to say, IF ((SOPackageDetail_trackNumber)) has a value, display the table, IF it does not have a value, do not display the table.
<p class="MsoNormal" style="line-height: normal;"><font face="Arial, sans-serif">Dear Customer,<br><br>This is an automatic email to notify you that Order # <span data-field="yes">((SOOrderShipment_orderNbr))</span> has been shipped with Shipment # <span data-field="yes">((SOShipment_shipmentNbr))</span>. You can find a copy of the shipment confirmation attached to this email.nbsp;<br><br></font></p><p class="MsoNormal" style="line-height: normal;"></p><p class="MsoNormal" style="line-height: normal;"><br></p>
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="background: rgb(255, 255, 255); width: 100%;">
<tbody>
<tr>
<td style="direction: ltr; font-size: 0px; text-align: left; vertical-align: top;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0">
<tbody><tr><td class="" style="vertical-align: top; width: 1000px;">
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 45%;">
<table role="presentation" width="40%" cellspacing="0" cellpadding="0" border="0" style="vertical-align: top;">
<tbody><tr><td align="left" style="font-size: 0px; word-break: break-word;">
<div style="font-family: sans-serif; font-size: 14px; line-height: 23px; text-align: left; color: rgb(0, 0, 0);">
<table width="70%" cellspacing="0" cellpadding="0" style="min-width: 100%;">
<tbody><tr>
<td>
<table class="smarttable" width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><thead>
<tr>
<th scope="col" width="40%" style="font-family: Arial, sans-serif; font-size: 14px; border: 1px solid rgb(237, 237, 237); border-collapse: collapse; line-height: 15px; color: rgb(0, 0, 0); text-align: left; background-color: rgb(237, 237, 237);">Tracking Number(s)<br></th>
</tr>
</thead>
</table>
<table width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><tbody><tr>
<td><foreach>
<table class="smarttable" width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><tbody>
<tr>
<td data-label="Tracking Number(s)" width="40%" valign="top" style="font-family: Arial, sans-serif; border: 1px solid rgb(237, 237, 237); border-collapse: collapse; font-size: 12px; line-height: 20px; text-align: left;">((SOPackageDetail_trackNumber))<br></td>
</tr></tbody></table></foreach></td></tr></tbody></table>
</td></tr></tbody></table>
</div>
</td></tr></tbody></table>
</div>
</td></tr></tbody></table>
</td></tr></tbody></table>
<br>
<span style="font-family: Arial, sans-serif;"><br></span><span style="font-family: Arial, sans-serif;"><br></span><p class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">If you have any questions, please don’t hesitate to reply to this email.</span></p><p class="richp"><br>Thank you for choosing The company</p>
Thank you!