How to use line breaks in expressions.(Power Automate Desktop)
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
Parameter | Value |
---|---|
Original text | Variables produced by the Append line to text Action If not renamed, %Result%. |
Start index | Character position |
Character position | 2 |
Length | Number of chars |
Number of chars | 1 |

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.
---
Discussion
New Comments
No comments yet. Be the first one!