cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

HTML formatted table in email disappears after replacing dummies with variables/list values

Jump to solution

I want to send formatted table through the email as a notification - to do that I use the "Build String" block and use HTML to create the table. As long as I use pure text it works fine:

nintex4.png

But once I start to replace the placeholders with variables or list content the table disappears completely from the mail. This thread​ suggested that the problem can lie in the spaces used in variable names, but table disappears even if I'd use only list elements.

HTML Code below

<table cellspacing="0" cellpadding="0" border="0" align="center" width="700" bgcolor="#ffffff" style="padding: 0px; font-family:Tahoma, Geneva, sans-serif; background-color:#ffffff; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"><tr><td><style type="text/css">.tg  {border-collapse:collapse;border-spacing:0;}.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}.tg .tg-8env{background-color:#fe0000;color:#ffffff;vertical-align:top;text-align:center}.tg .tg-yw4l{vertical-align:top}@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;}}</style><div class="tg-wrap"><table class="tg"><tr><th class="tg-8env" colspan="2">I.T. Change Proposal</th></tr><tr><td class="tg-yw4l">Proposed by:</td><td class="tg-yw4l">ININTIATOR</td></tr><tr><td class="tg-yw4l">Change details:</td><td class="tg-yw4l">CHANGEDESC</td></tr><tr> <td class="tg-yw4l">Business units impacted:</td><td class="tg-yw4l">BIZUNITS</td></tr><tr><td class="tg-yw4l">Affected systems:</td><td class="tg-yw4l">SSYSTEMSINVOLVED</td></tr><tr><td class="tg-yw4l">Priority:</td><td class="tg-yw4l">PRIORITY</td></tr><tr><td class="tg-yw4l">‎‏Risk</td><td class="tg-yw4l">RISK</td></tr><tr><td class="tg-yw4l">Possible outage:</td><td class="tg-yw4l">OUTAGESTART</td></tr></table></div></td></tr></table>

(it can be validated on the http://http://www.onlinehtmleditor.net)

Tags (1)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: HTML formatted table in email disappears after replacing dummies with variables/list values

Jump to solution

Hello Kristof,

I had an similar issue.

My solution was.

Adding the style information direct onto the columns/rows, instead of using the "class" attribute

Just for testing proposal's:

Use a plain HTML Table, without any style information, and see if its works.

hope it helps,

best regards

Oliver

Reply
Not applicable

Re: HTML formatted table in email disappears after replacing dummies with variables/list values

Jump to solution

Yes, I came to the same conclusions yesterday, CSS seems to kill the tables. Just FYI my table code now looks like this:

<table style="border-collapse:collapse;border-spacing:0;border-color:#aaa"><tr><th style="font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#fff;background-color:#fe0000;vertical-align:top" colspan="2">I.T. Change Proposal</th></tr><tr><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;font-weight:bold;vertical-align:top">Proposed by:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;font-weight:bold;vertical-align:top">‎‏{Variable:Requestor}‌</td></tr><tr><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;font-weight:bold;vertical-align:top">Change details:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;font-weight:bold;vertical-align:top">‎‏{Current Item:Change Description}‌</td>

....

</table></div>

Bit big, but indeed you can see that each <td> and <th> has style defined within.

0 Kudos
Reply