cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tre4B
Advocate IV
Advocate IV

How can you enter a Newline into a string?

I'm trying to update a description field in a string.  I want to add a newline between each update, I just cannot figure out how.

 

I've tried the normals like \n \\n etc. and I've looked for Expression functions like Newline, char.

 

How can I do this?

36 REPLIES 36
chandu_siddi
Frequent Visitor

Hi,

You can use html tags for newline i.e <br> tags might help you


If your issue is resolved please accept this as solution

thanks

Hello,

 

Yes, to format the email, use the html tags and <br> will help in new line character. Make sure in the advanced setting of email,     "is HTML" is set to 'yes'

 

Thanks and Regards,

Bharat

GrandMaZzZBOY
Frequent Visitor

Came across something really simple. What you do is put your mouse cursor into that value field, press Enter on the keyboard so it adds the line/carriage return. That is it. Verify using PeekCode view, you should see character return value.
DBean
Frequent Visitor

@jvdlinden  I tried this method, and it doesn't work for me - I'm still not getting carriage returns.  Any suggestions?

 

DBean_0-1597431085690.png

 

DBean_1-1597431098538.png

 

DBean_2-1597431111309.png

 

DBean_3-1597431321621.png

 

 

Looks to me like you might be getting a carriage return in your final results (after "Comments" and before "Link to request").

 

Make sure your email is not set to HTML.

 

Did you mean to put a LineFeed after each "Response?"

 

 

DBean
Frequent Visitor

@PepPower Yes, my apologies - I left that detail out.  I'm appending the name, decision, and decision notes to the variable at the end of each of four parallel approval threads, then displaying the contents of the variable in the decision email.  I've included the line feed variable at the end of each of the Append actions, so there should be a carriage return after each Notes field.

I looked in the email settings, and I don't see any mention of HTML.  There is a Code View button in the editor - is that what you're referring to?

@PepPower I know I am late to the party, but thank you for your steps.

 

I was stuck trying to figure out how to add a hard return.  The connection I was trying to send information to would not take the HTML <br/> or any other formatting options.

 

Creating an empty variable with a return as the initial value allowed me to separate my text and appear properly.  Many thanks

Anonymous
Not applicable

Initialize a new variable and set the value as <br>

Use this variable in the value of "Append to string variable"

 

this will break the dynamic values in the string. Cheers.

adding <br> to variable setting did it. Thank you! I could not find how to check the html box for sending the email, but I didn't need to do it.

axis0401
New Member

Create Compose1 action and type inside i.e. :
[ 1, 2, 3, 4 ]
to create an array.

Create second Compose2 and inside just press enter and save (Compose2 has now two empty lines )

Now join/concatenate array in Compose1 with Compose2.

Create third Compose3 and type in expression:
join(outputs('Compose1'), outputs('Compose2'))

Result:

1
2
3
4

MrBU
Regular Visitor

Hi:

 

I've just tried that, and it worked just fine.

 

Here are two screenshots of my flow:

flow01.pngflow02.png

 

Please let me know if you could make it work too.

 

Saludos, Miguel.

You're a Genius 😁 Saved me a bunch of work. Used it with "\r\n" to handle CSV and it worked like a charm.

Thanks!

Anonymous
Not applicable

Just use alt+enter

leyburn19
Memorable Member
Memorable Member

This did not seem to work for me.  Are you saying you use Append to string variable action.  Insert the field and just hit enter.  I do that and it looks like it adds a new line but this does not seem to show in the result

I'm not sure what you have use but you can use html tags for newline i.e <br> tags might help you

gvaldez0290
New Member

Line1                            

<br>

Line2           

<br>

Line3

 

gives you 

 

Line1

 

Line2

 

Line3

did you try <br> every place you want a new line?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,067)