$MyVar + '\n'
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
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.
<br/> does the trick!
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.
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