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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Line Breaks inside arrays
Power Automate
Suggested Answer

Line Breaks inside arrays

(1) ShareShare
ReportReport
Posted on by
Hi,
 
I am using an array to take information from a MS form to create an HTML file and then a PDF file.
 
I'm using the select fuction.
 
In "From" I have:
 
Createarray(...)
 
In "Map" I have:
 
{

"What is your name" :  (var),
"What Is your contact number?" : (var) ,

"What Is your contact number?" :  (var),
"Date of attendance" :  (var),
"Was it helpful" :  (var),
"Which training did you attend?" :  (var),
"How do you rate this training?" : (var),
"Prefered training time for the future" : (var)
}
 
(please see attachment - Jsonerror.png)
 
This works fine apart from the fact that it just come as one block of text - on a single line.
 
(please see attachment - output.png)
 
What can I put after the variable to indicate that I want a new line? Whatever I seem to use, it spit out:
 
Enter a valid JSON 
 
See attached (Jsonerror.png) where I have used:
 
//n
 
Please can you tell me what is the correct syntax?
Output.png
Jsonerror.png
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi
     
    So if I was going to do it, I would have created an array, and appended each item into that array variable.
    Then used the Create HTML action with the array (not json), where you would have added Headers to it before adding in the data.
     
    That way you get an HTML table that you could use CSS on.
     
    However, the single line thing is what the HTML Table will look like exactly so if you dont put CSS to format it, it will look about the same.
  • Suggested answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at
    Hi 
     
    Try the following
     
     
    "What is your name" :  (var),
    "What Is your contact number?" : (var) ,

    "What Is your contact number?" :  (var),
    "Date of attendance" :  (var),
    "Was it helpful" :  (var),
    "Which training did you attend?" :  (var),
    "How do you rate this training?" : (var),
    "Prefered training time for the future" : (var)
     
    Create the above on a compose action step. For the new lines enter <br/> tag. Then create an HTML file and convert to PDF
     
    See below
     
     
     
    You can extend this steps to delete the HTML file once the PDF file is created.
     
     
    Thanks
     
     
  • Suggested answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at
    If you want to format using stylesheet please see below great article from Ryan
     
     
    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard