Return Character in Change Data Value

SanfordWhiteman
Level 10 - Community Moderator

Re: Return Character in Change Data Value

I'm pretty sure everything when viewing a lead record is set to not interpret encoding like that

Nah, textarea/longtext must support \n.

Anonymous
Not applicable

Re: Return Character in Change Data Value

I'm a little confused about what you mean by "must" support. If you do a change data value that uses "\n", it will not show a line break when you view the lead record. In general, I'd advise against adopting flows that require such "hacks", as they tend to rely on aspects of Marketo that may be fixed down the road (thus causing them to "break"), and will at the very least cause confusion to future admin users in your instance.
@justin - where are you trying to see line breaks? Is this for yourself when viewing lead records in Marketo? Or is it for your sales team?

Grant

Anonymous
Not applicable

Re: Return Character in Change Data Value

I would like to be able to see it in Marketo on the Lead record itself. I currently have all the data there, it is just a bit difficult to read... The sales team usually doesn't pay much attention unless I were to notify them directly via email.

-Justin

SanfordWhiteman
Level 10 - Community Moderator

Re: Return Character in Change Data Value

I'm a little confused about what you mean by "must" support.

I mean that the Marketo textarea/SFDC longtext must support embedded line breaks.  Otherwise, it could not hold data that contains line breaks, which it does (you can post such data directly from a form textarea, for example).

A second question is whether flow rules as saved in your Marketo instance can have line breaks.  This, too, is supported.

The part that's broken is that the widget in the Marketo UI that is used to manage flow rules is a one-line textbox that does not support embedded line breaks.  They are removed even before the data is sent to your instance.

That's why the hack has to skip the rules applied by the textbox display widget, since those are stricter than the rules of the underlying database(s) -- a pattern found somewhere in almost every web app.  (If and when flows can be updated via API there would be no reason to reproduce this display rule.)

If you do a change data value that uses "\n", it will not show a line break when you view the lead record.

That's because the escaped character "\n" never gets unescaped.  It's a literal "slash-followed-by-lowercase-n" in that context.  demo

So by adding a literal "slash-n" you aren't even trying to add a line break.  

The fact remains, though, that even if you do put (programmatically) a true line break the textbox, it will also get stripped by default.  So you need to go a level deeper.

In general, I'd advise against adopting flows that require such "hacks"

Sure, but if you want it now, you have to use a hack.

Aslihan_Ayan_Ha
Level 7

Re: Return Character in Change Data Value

Thanks for your help.

Grégoire_Miche2
Level 10

Re: Return Character in Change Data Value

Has anyone entered and idea about this ?

I'll vote.

-Greg

Robb_Barrett
Marketo Employee

Re: Return Character in Change Data Value

I just upvoted. Our sales folks are complaining about sending over unformatted notes.  A step further would be to make the CDV a Rich Text Editor with bullets, bolds, etc but I'm sure that'd be tricky depending on the CRM it's sending to.

Robb Barrett
Anonymous
Not applicable

Re: Return Character in Change Data Value

Agreed, this would make this much easier    

SanfordWhiteman
Level 10 - Community Moderator

Re: Return Character in Change Data Value

Justin, I don't think I ever heard from you about this.  You can create a {{my.linebreak}} token using my method that'll work fine.

Anonymous
Not applicable

Re: Return Character in Change Data Value

Hi Sanford,

Thanks! Im assuming that my.linebreak is a richtext token with a linebreak in it?