Linebreak in string variable

3
I have created a document with a string variable. This variable has possibly 1/2/3 lines. Lines 2 and 3 are written by a loop. I don't use no widgets for the text. Which code can I use for a new line? HTML Codes like: br, \n, \r\n\, 'enter' don't work!
asked
10 answers
6

You make your string in a microflow. I imaging your first iteration does:

string x = "first line"

What you have to do for the second line is

x = x + "
second line"

Note(!) the line-break in my second statement. HTML / HTML entities e.t.c. is not supported yet, you have to make a real line break in your variable change action.

N.b.: There is already a feature request in our Partner Portal for a HTML widget in document templates.

answered
4

see this question or this question

answered
2

Nothing works! newline, etc!

answered
2

'%0A' don't work either!

answered
2

Hi bro,
It’s good!

answered
1

I had the same problem when building an email message for an external link with HTML mailto:...

Use 'First line' + '%0A' + 'Second line'. This should work.

answered
0

<br/> works!

answered
0

for people trying to format email, from a Text area.

 

replaceAll($YourStringVariable , '
', '<br>')

 

image.png

answered
0

I am not so sure about the Text area, but in place such as Tooltip text, I would just put it into a parameters, where I can then put an empty line (not empty string). See example below:

 

NewlineInMendix.png

answered
0

Hi,

we can simply use 

‘ First Line ‘ + ‘</br>’ + ‘Second Line ‘ + ‘</br>’ + …..

 

</br> for next line 

answered