The field is checked off in the tree on the right-hand-side of Script Editor?
It was when I initially created it (since I checked it; and dragged the field into onto the canvas) - but after checking now, it was not checked. So repeated the process again (confirmed it's now checked, even after saving, closing and re-editing the script). Here's the result:
Do you think I need to use two line-break tokens in the history field, instead of one?
Here's the value as it appears in the database:
Nah, only need one. br() changes every single linebreak. What about if you manually hit enter in the field and add another line? That'll help us narrow down.
Nope, same result as above. Here's the new value in the DB:
2017-07-24 12:58:39: Promoted to MQL after attending an Avanade Event: 2017-06-14 NA USA EV-ML Retail Executive Summit-ERP TracyA
2017-07-24 12:48:44: Attended an Avanade Event: 2017-06-14 NA USA EV-ML Retail Executive Summit-ERP TracyA
2017-07-24 12:43:47: Registered for an Avanade Event: 2017-06-14 NA USA EV-ML Retail Executive Summit-ERP TracyA
OK, now we know it isn't the line break token itself.
I'll check this again and get back.
Dan, I can't repro this.
Here's text field with newlines:
The Velocity token to change the true newlines to <BR>s:
And the output:
This is so odd - and such a simple test. Not sure why you and I are experiencing this differently:
Added three lines to the Notes field (using regular line breaks (hitting "enter" after each) - not your technique. Alternatively, I even tried using SHIFT-ENTER for a soft linebreak (and another time with two linebreaks):
The velocity token (Test-linebreak2):
The token placed in the email:
I even tried another technique that you authored here: http://blog.teknkl.com/newlines-to-brs-in-velocity/
And still no luck. I also tried using a bare-bones HTML email. This is driving me crazy.
So bizarre! What would Velocity be doing here if not altering the output... and not throwing an error?
It's as if your fields don't contain \n.
Can you try another replacement, as a sanity check?
Now we're getting somewhere. Here's the email - where everything has been replaced with <BR> - the gray area is me highlighting them with my mouse:
And here's the code to prove it:
But I have no periods "." in that field. What was replaced with all of those <br>'s? Or did this replace every character (including the 2 line breaks) with a <br>? There are are 17 characters (include the breaks), and 17 <br>s here.