Skip to main content

I am using the Create a text string action to build up a list in a foreach loop. When I write the contents of the variable in Log to instance details, each item is on its own line. 

When I add that same variable to an email, all of the items end up on the same line. 

How can I fix this so that each item is on its own line in the email, just as it appears when I log to instance details?

Thanks!

Hi @Michele 

 

Try to use one of the following HTML Tags when you build up your Text string

  • HTML Breaks <br>.
    Line 1 <br>
    Line 2 <br>
    Line 3 <br> 
  • HTML paragraph  <p>This line </p> 
    <p> Line 1 </p>
    <p> Line 2 </p>
    <p> Line 3 </p>

 


Thanks for your response! How do you insert HTML in the “Create a text string”? Wouldn’t it just add those characters to your text as literals? 


How are you building your text string in the loop?

 


Thank you, @Garrett ! 

I’m using Operations - Create a text string.

I just did what you suggested by wrapping the line in <p></p> tags. And the html tags do not display in the email, but indeed format the email correctly. 

I was thinking you had to do something to explicitly tell Nintex you were using html, but apparently in the email body, it just recognizes html strings automatically. This makes sense now that I understand it. And I see that the email Message body is formatted with html by default. It’s just hidden unless you explicitly click on the html button.

Thanks again!

 


You’re welcome @Michele 

 

If you want better control over the text formatting, look into using HTML tables 

 


Great idea! Thank you. I will keep that in mind for the future. 

And now I have to decide which answer to mark as the best! :-)


Reply