Skip to main content
Nintex Community Menu Bar
Answer

Nintex O365 Email HTML Table does not space correctly when the HTML is in a variable

  • October 11, 2023
  • 4 replies
  • 99 views

Forum|alt.badge.img+5

Hi.  I am using Nintex O365. When I enter HTML directly into the body of an email, to create a table, it works fine (see IMAGE 1 below).  When I copy/paste the exact same HTML into a text variable and use the variable in the body of the email, the spacing is off (see image 2).  I use a Build String to create the HTML into the variable.  The HTML is shown below the 2 images. Does anyone know why this is happening and what I can do to fix this?

IMAGE 1

 

IMAGE 2:

 

HTML

<p> </p>
<table border="1" cellpadding="3" cellspacing="1" style="width:650px;"> <tbody> <tr> <td colspan="3" style="text-align:center;background-color:Gainsboro;"><strong>Weekly EForms Summary</strong></td>
</tr>
<tr> <td style="text-align:center;"><strong>Task Name</strong></td>
<td style="text-align:center;"><strong>Assigned To</strong></td>
<td style="text-align:center;"><strong>Date and Time</strong></td>
</tr>
<tr> <td>Accounts Receivable for Write Off Request - 188</td>
<td>xxxxxx, xxx x</td>
<td>10/6/2023 1:41:28 PM </td>
</tr>
<tr> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr> <td colspan="3" style="background-color:Gainsboro;">For questions, please complete a Service Now ticket.</td>
</tr>
</tbody></table>
<p>&nbsp;</p>

 

Best answer by bamaeric

You might also try making sure the HTML is all in one continuous string with no line breaks in the text when you’re using the Build String action. Have the tag close and open characters (><) have nothing in between them.

4 replies

AnthonyD
Nintex Employee
Forum|alt.badge.img+6
  • Nintex Employee
  • October 11, 2023

Hello @SShaffer2 ,

There is definitely some changes that occur between normal html code and using variables.

I personally had a different experience and a different result using NAC. 


I think if you update your html in the variable so the rows are “<tr style="height:20px">” then this might fix your issue.

Thanks,

Anthony


bamaeric
Forum|alt.badge.img+14
  • Apprentice
  • Answer
  • October 11, 2023

You might also try making sure the HTML is all in one continuous string with no line breaks in the text when you’re using the Build String action. Have the tag close and open characters (><) have nothing in between them.


Forum|alt.badge.img+5
  • Author
  • Rookie
  • October 26, 2023

Removing all spaces and making sure the HTML is all in one continuous string with no line breaks in the text did the trick.  Thank you!


bamaeric
Forum|alt.badge.img+14
  • Apprentice
  • October 26, 2023

Glad that worked for you! I had the same thing happen to me in the past and I stumbled upon this fix.