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

CRLF in "Create File"

Hello All,

 

Please kindly have a look below 🙂

 

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
New Member

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.Setting the flowSetting the flow

 

Flow output as seen on NP++Flow output as seen on NP++

 

View solution in original post

13 REPLIES 13
Highlighted
Community Support
Community Support

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.
Highlighted
Advocate II
Advocate II

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).

Highlighted
Advocate II
Advocate II

Re: CRLF in "Create File"

@v-yamao-msft

 

Any ideas?

 

Is this a bug?

Highlighted
New Member

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.

Highlighted
Advocate II
Advocate II

Re: CRLF in "Create File"

@Saikumar

 

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

 

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. 

Highlighted
Frequent Visitor

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.

Highlighted
Advocate II
Advocate II

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.

Highlighted
Advocate II
Advocate II

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?

Highlighted
Frequent Visitor

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
New Member

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.Setting the flowSetting the flow

 

Flow output as seen on NP++Flow output as seen on NP++

 

View solution in original post

Highlighted
Advocate II
Advocate II

Re: CRLF in "Create File"

Thanks, that worked perfectly 🙂

Highlighted
Frequent Visitor

Re: CRLF in "Create File"

Hello @Saikumar,

You save my day! thanks to you bro!
 

Highlighted
New Member

Re: CRLF in "Create File"

<br/> worked just fine for me, thanks!

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (6,581)