How to use line breaks in expressions.(Power Automate Desktop)


Japanese version.

There is no way to specify a newline code, such as vrCrLf. This section shows how to use the newline as a variable in the application of actions.

How to use

First, set up the Append line to text Action, specifying one character each for "Original text" and "Line to append".

In the example, "1" and "2". Any characters are acceptable as long as they are not special characters, but single-byte alphanumeric characters are recommended.

Next, place the Get Subtext Action and specify the following

Original textVariables produced by the Append line to text Action
If not renamed, %Result%.
Start indexCharacter position
Character position2
LengthNumber of chars
Number of chars1

When Get subtext Action is executed, the Variables produced will contain the line break code.

This makes it possible to include a newline in the expression.

If not renamed, it is %Subtext%, but %NewLine% or something similar would be easier to understand.