Retain Carriage Return or Line breaks

Certified Associate Developer

Hi,

I have a paragraph field in my interface, I am sending the user comments from this field into email. The line breaks are not retained and all the text is displayed in a single line.

So I have figured out that, if I can store the expression type of the data into local variable, I can replace the char(10) with </br> while passing into email. 

I need help in storing the expression format of the value. How can I do that?

Lines in paragraph

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I need help in storing the expression format of the value

    You're mistaking what you're seeing in the output.  The line breaks *are* stored in the saved value, regardless of whether you select "Expression view" - that merely changes how it's formatted by Appian for output on your screen in that case.  When you leave it set to "formatted", sadly, Appian strips out extra stuff like Line Breaks (i kinda wish they'd change this, as it makes certain troubleshooting unnecessarily difficult).  If you were to change the output to the "Raw" setting though I believe you'd see your lines split by linebreaks basically as expected.

Reply
  • 0
    Certified Lead Developer
    I need help in storing the expression format of the value

    You're mistaking what you're seeing in the output.  The line breaks *are* stored in the saved value, regardless of whether you select "Expression view" - that merely changes how it's formatted by Appian for output on your screen in that case.  When you leave it set to "formatted", sadly, Appian strips out extra stuff like Line Breaks (i kinda wish they'd change this, as it makes certain troubleshooting unnecessarily difficult).  If you were to change the output to the "Raw" setting though I believe you'd see your lines split by linebreaks basically as expected.

Children
No Data