I'm trying to update a description field in a string. I want to add a newline between each update, I just cannot figure out how.
I've tried the normals like \n \\n etc. and I've looked for Expression functions like Newline, char.
How can I do this?
Yes, to format the email, use the html tags and <br> will help in new line character. Make sure in the advanced setting of email, "is HTML" is set to 'yes'
Thanks and Regards,
Looks to me like you might be getting a carriage return in your final results (after "Comments" and before "Link to request").
Make sure your email is not set to HTML.
Did you mean to put a LineFeed after each "Response?"
@PepPower Yes, my apologies - I left that detail out. I'm appending the name, decision, and decision notes to the variable at the end of each of four parallel approval threads, then displaying the contents of the variable in the decision email. I've included the line feed variable at the end of each of the Append actions, so there should be a carriage return after each Notes field.
I looked in the email settings, and I don't see any mention of HTML. There is a Code View button in the editor - is that what you're referring to?
@PepPower I know I am late to the party, but thank you for your steps.
I was stuck trying to figure out how to add a hard return. The connection I was trying to send information to would not take the HTML <br/> or any other formatting options.
Creating an empty variable with a return as the initial value allowed me to separate my text and appear properly. Many thanks
Initialize a new variable and set the value as <br>
Use this variable in the value of "Append to string variable"
this will break the dynamic values in the string. Cheers.
adding <br> to variable setting did it. Thank you! I could not find how to check the html box for sending the email, but I didn't need to do it.
Create Compose1 action and type inside i.e. :
[ 1, 2, 3, 4 ]
to create an array.
Create second Compose2 and inside just press enter and save (Compose2 has now two empty lines )
Now join/concatenate array in Compose1 with Compose2.
Create third Compose3 and type in expression:
I've just tried that, and it worked just fine.
Here are two screenshots of my flow:
Please let me know if you could make it work too.
This did not seem to work for me. Are you saying you use Append to string variable action. Insert the field and just hit enter. I do that and it looks like it adds a new line but this does not seem to show in the result
It's a conversion process.
First you create a JSON object stringfied:
The \n is a valid JSON notation and it will converted to a New Line from the function json():
And from the object (a Power Automate object) you get the property NL (you can change this name) value, .i.e the new line:
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.