Adding a new line using microflows

8
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
4 answers
4

$MyVar + '\n'

answered
2

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
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
1

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