Re: Creating a New Line Program Token to Organize a History Field

Dan_Stevens_
Level 10 - Champion Alumni

Re: Creating a New Line Program Token to Organize a History Field

So I went ahead and created a test trigger campaign and all tests rendered successful.  So I've confirmed (unless proven otherwise) that when velocity scripts - or maybe just some - are used within alert emails that are part of a batch campaign, only the token itself will render, and not transformations on that token.  For example, this:

${display.br($lead.avanadeInterestingMomentHistory)}

will not insert <br> for all line-breaks, but it will display the unaltered value contained in the lead field (in this case "Avanade Interesting Moment History")

SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a New Line Program Token to Organize a History Field

I don't think that's it: I think it's that the linebreaks are changed to spaces, so .br() runs but has nothing to do.

Dan_Stevens_
Level 10 - Champion Alumni

Re: Creating a New Line Program Token to Organize a History Field

Is there another type of "search/replace" script that can be used on normal text strings?  I can then run it on something we can see; and something that's present in both batch and trigger campaigns.

SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a New Line Program Token to Organize a History Field

Sure, that code above with replaceAll() changing every char (".") to "<br>".

Dan_Stevens_
Level 10 - Champion Alumni

Re: Creating a New Line Program Token to Organize a History Field

Now we're unable to run any VS - look at the right panel:

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a New Line Program Token to Organize a History Field

Mine looks okay, though.

Dan_Stevens_
Level 10 - Champion Alumni

Re: Creating a New Line Program Token to Organize a History Field

Mine's ok now as well.  Not sure what that was all about.  Anyway, I just ran that script using a batch and trigger campaign - and it rendered fine both times:

"test1 test2 test3" transformed to "DAN1 DAN2 DAN3"

So your theory is back on the table.

SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a New Line Program Token to Organize a History Field

So I think the way to address it is ​Why is Marketo ​changing linebreaks to spaces only for batches?​ I wonder if anyone else is lurking on this thread and can share their findings.

Alex_Shelukhano
Level 2

Re: Creating a New Line Program Token to Organize a History Field

Hi guys,

I have the same problem with removed line breaks. Did you try to contact Marketo support to resolve the issue?

Thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a New Line Program Token to Organize a History Field

How are you inserting the line breaks originally? To make sure this is the same case.