Genpact Cora Knowledge Center

Support

Retain Line Breaks in Multi-Line Text Returned From an Expression

Overview

In some cases, when you send an email message that includes an expression that returns a string from a multi-line textbox, the line breaks are lost. This occurs because of the representation differences of line breaks between plain text and HTML modes.

For example, instead of the message displaying like this:

line1
line2
line3

it displays like this:

line1 line2 line3

There are two options to avoid this issue.

Option 1

In the Message tab of the Message Details wizard, under the body editor, from the drop-down menu change HTML to Plain Text.

Option 2

If you need to retain HTML styling, replace the line breaks with the HTML equivalent, <br> tag.

Example:  { Replace(wf.Variables["MultilineText"], char(10), "<BR>") }