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?
Answering my own question as I found a work around. I used
and this seemed to work fine 🙂 If there is an easier way though I would still like to hear it.
I have the same problem and still cannot make it work 😞
Did you use the json code in a "Variables\Append to String" Action or maybe Compose?
My goald we be to just enter a new line after the built string variable:
Hey tre4B - Glad you figured this out. I am not able to get it to work for me however. I put the string you shared below into an Expression in my Multi-Line Text Field (Comments-). See below.
How did you get your solution to work?
Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @Jambo1‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!
Thank you for being an active member of the Flow Community!
Flow Community Manager
I was looking all over the place trying to figure out how to add a CRLF (or LF) to the end of strings I was writing to a file. Simply creating a variable and initializing it with a <RETURN> key and then referencing the variable in my expression ended up with something like this (as a test):
join(createArray(convertTimeZone(body('Get_event_(V2)')['Start'],'UTC','Central Standard Time','dddd M/d/yyyy h:mmtt'),convertTimeZone(body('Get_event_(V2)')['End'],'UTC','Central Standard Time','dddd M/d/yyyy h:mmtt')),variables('CarriageReturn'))
This wrote my dates to my file (stored on OneDrive for Biz) which then showed up on my PC (like magic) with this content:
Thursday 2/7/2019 10:00AM
Thursday 2/7/2019 10:30AM
So simple...yet so difficult to figure out!
This answer would not cover a variety of diferrent cases, Howerver, if you would like to add new line between two daynamic values within a whole string, i just typed the enter key and it worked for me.
so it will look like below:
Please note a single quotation at the beginning of the [Daynamic value1] and at the ending of [Daynamic value2].
All of the above approaches fail.
However, I did stumble upon a setting in the Properties of the 'Plain Text Content Controls'
And then this answer helped me: https://stackoverflow.com/questions/3091524/what-are-carriage-return-linefeed-and-form-feed
It helped me because it introduced '\r' as the 'Carriage Return' that I was looking for.
You can follow the syntax below in 'Append to String' to start from a new line:
concat(.......... ,'<br />')
PS: ENTER key option only works when there are just two lines but not for more than that.
For multi-line fields, the easiest way is to use the Unicode for a newline and put \u000a wherever you want to add a newline in the PA JSON of a SharePoint field.
I haven't tried it on a single-line field, but it may work there too
I was facing the exact same issue. Couldn't figure out why populating my Word template didn't result in proper break lines.
Turned out you need to enable Developer tab in the ribbon, open properties of the Plain Text label and indeed enable the carriage return chechbox: ("New line characters will be rendered when "Allow carriage returns (multiple paragraphs)" setting is turned on in the content controller properties.")
The easiest and most clear way I found to include a new break line into a Append to String action is to initialize a new variable with just the new break line in it, and then use this variable in the Append to String (in my case For Each).
At least this clearly shows where the break line is inserted.
Thanks @AndreiCiurea this worked 🙂 However I am creating a flow, when a Form is submitted an Azure Devops workitem is created.
However the string format in the ADO is not the same as the one given as an input in Form. Any solution on this ?
I mean to say it is not taking the newline character. any lead is higly helpful
Features releasing from October 2020 through March 2021
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!