Custom Report - All Interesting Moments

Highlighted
Level 10 - Champion Alumni

Re: Custom Report - All Interesting Moments

If you plan on using this history within an email alert, once you deploy Sandy's technique, it's still necessary to replace the hidden line breaks with actual HTML <br>. Again, with Sandy's help, using this single line velocity script token that takes the history value and replaces the line-break with a <br>. And it's this token that you'll place in your email, rather than the actual history field:

pastedImage_0.png

Highlighted
Level 1

Re: Custom Report - All Interesting Moments

Hi Dan,

thank you for the clarification!

The first part of actually being able to display line-breaks in the Marketo user interface, worked perfectly. Thank you Sanford for the suggestion!

However I cannot figure out the second part that you outlined - displaying the line-breaks in Email alerts as well. In the program where I have the alert, I made a new email script my.token and as per your suggestion in the token I put ${display.br($lead.InterestingMomentHistory)} but the first { and the last } highlight in red and in the alert, instead of showing the content of the {{lead.Interesting Moment History}}, I just see the value I put inside the script token. Do you know where I can be making mistake here?

I also tried inserting in the script token the value $lead.InterestingMomentHistory.replaceAll("\n","<br/>") similar to what was suggested in another thread Line breaks are not displayed in emails but that also just displays the value inside the scrip token in the alert.

Thank you in advance for helping out!

Highlighted
Level 10 - Community Moderator

Re: Custom Report - All Interesting Moments

Make sure your field is checked off in the tree in Script Editor.

Highlighted
Level 10 - Champion Alumni

Re: Custom Report - All Interesting Moments

Hi Iva - did you also make sure the field is checked in the right pane?:

pastedImage_0.png

Highlighted
Level 1

Re: Custom Report - All Interesting Moments

I had not checked it in the right hand-side, so I did that:

Interesting Moment History script token.PNG

But when I send the alert still only the contents of the script token display. I am sending the alert through the "Send Sample Email" feature. Can that be part of the problem? The other tokens in the email are working fine though

Highlighted
Level 10 - Community Moderator

Re: Custom Report - All Interesting Moments

Send Sample can't be used to test Velocity tokens.

Highlighted
Level 10 - Champion Alumni

Re: Custom Report - All Interesting Moments

Also, for us, this only works - and must be tested as such - when the email alert is sent within a trigger campaign (batch does not render the <br> properly for some reason - have a look at this thread where Sandy and I ran through several test to come up with this finding and potential bug: Re: Creating a New Line Program Token to Organize a History Field ). So you'll need to create two test campaigns: one to send out the actual alert (with a "campaign is requested" trigger); and another to define the audience and then a "request campaign" flow step.

Highlighted
Level 1

Re: Custom Report - All Interesting Moments

Thank you both very much for clarifying and helping out! I definitely learned a lot one new things