web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can I cause a line...
Power Automate
Unanswered

How can I cause a line break in a .txt file I am generating?

(0) ShareShare
ReportReport
Posted on by 5

Basically as the post says, my goal is to generate a text file with the previous month's start and end dates on line 1 & 2. Currently, I am pulling the dates but I cannot for the life of me get a break between them. I have tried numerous solutions off this board, but none of them seem quite right to me. Here is my flow and it's current output : 

ajh2024_0-1706285678701.png

ajh2024_1-1706285730786.png

This is my first forum post, so I apologize if something is out of format or out of the norm. I genuinely appreciate any help that is received and hope you all have an awesome day!

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @ajh2024 

     

    Pls use expression to join all three variables with insertline break variable in the middle. In the expression, use concat function for joining the variables. Expression need to be added in file content parameter in create file action.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • ajh2024 Profile Picture
    5 on at

    Hi, I have done this, but it does not keep the line break in the variable. For example, if I just hit 'Enter' and concat that as the line break, it will remove the 'Enter' when I hit save and just carry the variable as blank and concat nothing. If I set that variable to decodeUriComponent('%0A') it just puts that in my text file. Either way, it is concat with the dates in the create file step. Thanks!

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @ajh2024 

     

    Here is the sample.

     

    I have hardcoded the values in both variables as an example.

    ManishSolanki_0-1706359207584.png

    ManishSolanki_1-1706359220907.png

     

    In create file action, add an expression in the file content as shown below:

    ManishSolanki_2-1706359315349.png

    concat(variables('varCMStartDate'),decodeUriComponent('%0A'),variables('varCMEndDate'))

     

    The output text file generated in SharePoint looks like:

    ManishSolanki_3-1706359383430.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard