cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
originalltd
Level: Powered On

CRLF in "Create File"

Hello All,

 

Please kindly have a look below Smiley Happy

 

I have a problem with a Flow, where I need to insert a breakline (CRLF) at the end of a line. This is proving difficult in my Flow.

See Flow process below:

 

 

How do I add a 'CRLF' at the end of each line?

 

I have tried <br> - this just outputs "<br>".

 

Top image is what the Flow does, bottom image is what I want it to do.

Capture.JPGCapture2.JPG

 

Thanks.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
SidhuSaab
Level: Power Up

Re: CRLF in "Create File"

I have used expression

 

uriComponentToString('%0D') for carriage return and

uriComponentToString('%0A') for line feed

 

successfuly in create file flow.14.jpgSetting the flow

 

13.jpgFlow output as seen on NP++

 

12 REPLIES 12
Community Support Team
Community Support Team

Re: CRLF in "Create File"

Hi @originalltd,

 

It seems that you are trying to start a new line in the created file. Please try to use the HTML break tag <br/> to see if it will work for you.

 

I have made the following test using flow to try to create a .doc file in File system. It is configured likes below and the created file displays fine.

1.PNG2.PNG

 

Hope it could be your reference.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
originalltd
Level: Powered On

Re: CRLF in "Create File"

@v-yamao-msft

 

This did not work. It still puts "LF" as the break line. It needs to be 'CRLF' as the break line.

 

If you manually created a .txt file in Windows Explorer, created a few lines and then opened the document in Notepad ++, you would see that by default it has created CRLF as it's break line.

 

Flow seems to be placing LF line breaks (Unix) rather than CRLF Breaklines (Windows).

originalltd
Level: Powered On

Re: CRLF in "Create File"

@v-yamao-msft

 

Any ideas?

 

Is this a bug?

Saikumar
Level: Powered On

Re: CRLF in "Create File"

I have an easier solution for you. Probablly would help.

 

1. Build a new variable(supposedly named "CRLF") using action "Initialiaze Variable"

2. Set the type of this variable as "String"

3. In the value field just place the cursor in it and hit the enter key(Return key).

 

Now you can use this variable "CRLF" to introduce the line break you are looking for by using concat() expression.

 

 

Hope that worked. If so, please vote my reply as the solution.

originalltd
Level: Powered On

Re: CRLF in "Create File"

@Saikumar

 

Unfortunatly, that did not work. Still uses 'LF' endings instead of 'CRLF' Smiley Sad

 

I don't think there is resolution for this until Microsoft change the way "Create File" works for it's output. I am baffled as to why it outputs in a Unix format instead of Windows. 

Dennis1Jung
Level: Powered On

Re: CRLF in "Create File"

Hey, did you find a solution?

I faced the same issue today, and i also tried to create cmd files for codesoft / sentinel.

originalltd
Level: Powered On

Re: CRLF in "Create File"

@Dennis1Jung - No solution from Microsoft I am afriad.

 

Codesoft are useless. An imported file with 'LF' endings crashes the application. Their solution to this problem? - Ensure the file outputs CRLF... (how about, fix your broken application?!)

 

I have a PowerShell script that monitors a folder and converts the file to CRLF endings if that helps? - It's not the best solution by far, but the only workaround I have.

LozzieD
Level: Powered On

Re: CRLF in "Create File"

I'm trying to do this too.

 

Seems incredible that this hasn't been reported and fixed already.

 

Outputting files from Flow with no ability to put a CRLF - wtf?

Dennis1Jung
Level: Powered On

Re: CRLF in "Create File"

It is working for me now, i changed the definition for each block to LF on the sentinel software.

 

sentinel.PNG

Highlighted
SidhuSaab
Level: Power Up

Re: CRLF in "Create File"

I have used expression

 

uriComponentToString('%0D') for carriage return and

uriComponentToString('%0A') for line feed

 

successfuly in create file flow.14.jpgSetting the flow

 

13.jpgFlow output as seen on NP++

 

originalltd
Level: Powered On

Re: CRLF in "Create File"

Thanks, that worked perfectly Smiley Happy

Charlon_
Level: Powered On

Re: CRLF in "Create File"

Hello @Saikumar,

You save my day! thanks to you bro!
 

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 76 members 3,913 guests
Please welcome our newest community members: