Adding a new line using microflows

9
I want to do some string manipulation within a microflow and one of the things I want to do is add a new line to a string, e.g. $MyVar + newline. Is this possible, and if so, how?
asked
6 answers
3

$MyVar + '\n'

answered
4

If adding '\n' doesn't work, just try to hit the 'return' button instead of typing '\n'. Example of a Change Object Value in a MF:

$Entity/attribute_1 + '
' + $Entity/attribute_2
answered
2

I want to add a new-line character to a string, so that it becomes two lines, i.e. 'one' + newline + 'two' becomes:

one
two

when printed.

I'm looking for the magic constant in Mendix which allows me to do that. In PHP it would be "\n", but '\n' doesn't work in Mendix.

answered
0

<br/> does the trick!

answered
0

If you are using text box then you can use multiple paramet to display in multiple line
Like: {1}
    {2}
This will display into different line.

answered
-1

I'm not entirely sure what you mean but your own example seems pretty close.

If you want to add string texts to a string what you need to do is state: $MyVar + ' newline' (watch the whitespace in front of the newline).

The new line needs to be between brackets (if you wish to type the content of the new line in the microflow expression).

For information on string operations in microflow you can look here

answered