cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
originalltd
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
SidhuSaab
New Member

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
v-yamao-msft
Community Support
Community Support

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.

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

@v-yamao-msft

 

Any ideas?

 

Is this a bug?

Saikumar
New Member

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.

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

Hey, did you find a solution?

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

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

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?

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

 

sentinel.PNG

SidhuSaab
New Member

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

Thanks, that worked perfectly 🙂

Hello @Saikumar,

You save my day! thanks to you bro!
 

Anonymous
Not applicable

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

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,819)