cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LasseT
Regular Visitor

how do I add a new line or carriage return into a string?

Hi,

 

I'm building a string of attached files in a SharePoint list (filename and URL for each attachment) to go into an email.

 

It works, but I would like a new line between each attachment in the email, how do I add a new line or carriage return into a string?

 

There is a similar subject post but I could not get anything to work?!?

 

So atm, my output is something like this:

File1 Url1 File2 Url2 File3 Url3 ...

 

and I would like:

File1 Url1

File2 Url2

File3 Url3

...

 

how to add CR.png

1 ACCEPTED SOLUTION

Accepted Solutions
LasseT
Regular Visitor

So after pulling my hair out for a while, I found that since the string is going inside an email I could add the HTML code </br> at the end to solve the problem.

 

fixed.png

View solution in original post

4 REPLIES 4
kdavis91
Continued Contributor
Continued Contributor

Hello!

Have you tried putting the return after your data in the "Append to string" variable action?

at the end you will have a single return, but I assume that wouldn't be a problem as the string is being dropped into an email.

 

I had my Flow loop through the rows in an excel table and append the value in the "Title" column to the string variable plus a carriage return, so every iteration of the loop adds the data to the blank line created in the last loop then adds a new line. I threw the variable into a Compose to see the output and it looked like it worked.

 

Please tell me if this works for you!

 

Kyle

 

 

Append to String.png

LasseT
Regular Visitor

So after pulling my hair out for a while, I found that since the string is going inside an email I could add the HTML code </br> at the end to solve the problem.

 

fixed.png

kdavis91
Continued Contributor
Continued Contributor

Glad you found a solution!

 

Good to know, too! I am not too HTML savvy, myself.

 

Have a good one!

Hi Kyle,

Will you please elaborate on what steps you followed for this ("I threw the variable into a Compose to see the output and it looked like it worked.")? I am also facing same issue and getting blank line in between and also header names keep on repeating during the append operation.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,565)