cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Talha
Advocate II
Advocate II

New Line for NotePad in Create File content

Hi All,

i am Creating .txt (NotePad) file in Sharepoint document Library through MS Flow.

but all the data are coming as a single line in NotePad.

 

Is there any possiblitiles to bring the text in Next line.

 

Please help to resolve this.

Thanks

8 REPLIES 8
faustocapellanj
Memorable Member
Memorable Member

Hi @Talha 

 

I replied to your question in the post linked below. Please check it out and let me know.

https://powerusers.microsoft.com/t5/Building-Flows/Line-Break-in-Create-File-Output/m-p/277296#M2852...

 

Regards,

Fausto Capellan, Jr

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Hi @faustocapellanj.,

 

Thanks for your replay.

"\r\n"

i had added the above character in MS flow for Line breaks. but its not working.

Please see the below image but its shown in single line in Notepad

Notepad.PNG

 

please let me know if you have any solutions.

Hello @Thala, You have to add the '\r\n' inside your concat() expression, not outside the way you have it. Please make that change and try again
Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Hi @faustocapellanj ,

 

thanks for your replay.

 

i had tried by adding the above character inside the concat() expression but same error its come single line as below:

 

ModuleName:Information Technology\r\nFromDate:06-04-2019\r\nChangedTo:Asan Kani

 

but i copied the above line from Notepad and paste in any other app line MS word, WordPad etc. its shown line with break as below image:

wordpad.PNG

 

so i can't find out the exact root cause for above.

Thanks

 

 

 

 

Can you please post your concat() expression?
Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Hello @faustocapellanj.

I am very glad to replay you

 

Please see the concat() expression which i was used in MS flow for Break Line.

 

First Line: 

concat('ModuleName:',triggerBody()?['Title'],'\r\n')

next line:

concat('FromDate:',utcNow('dd-mm-yyyy'),'\r\n')

Next line: 

concat('ChangedTo:',triggerBody()?['Responsiblity']?['DisplayName'])

for Testing i had used three lines.

can you please check above code is correct or need to change anything

Thanks

Hi @Talha 

So here's what you need to do: add a Data Operations - Compose action, rename it to CRLF., and in the *Inputs field press enter to add a new empty line, similar to the screenshot below.
linebreak-1.png
Then build your expression like:

 

concat('Hola', outputs('CRLF'), 'como estas?', outputs('CRLF'), 'muy bien')

linebreak-2.png
I tested the approach and Flow adds the line break, but Notepad doesn't show it. At this point, I'd suggest to switch to another text editor such as Notepad++.

 

 

 

 

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!
felipe_e
Frequent Visitor

If you do not want to add an extra 'compose' step, you can directly reference the \r\n by using decodeUriComponent(). Use %0D for \r and %0A for \n. Your first line would then be:

 

concat('ModuleName:',triggerBody()?['Title'],concat(decodeUriComponent('%0D'),decodeUriComponent('%0A')))

 

---

Did I answer your question? Mark my post as a solution!

Did my response help? Please give it a thumbs up!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,049)