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?

38 REPLIES 38
Anonymous
Not applicable

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.

@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?"

 

 

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

Anonymous
Not applicable

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

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

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

Anonymous
Not applicable

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

gvaldez0290
Regular Visitor

Line1                            

<br>

Line2           

<br>

Line3

 

gives you 

 

Line1

 

Line2

 

Line3

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

EpsilonNegative
Regular Visitor

Pressing Enter two times did it for me, just to add another possible solution.

It's a conversion process.

 

First you create a JSON object stringfied:

'{"NL":"\n"}'

 

The \n is a valid JSON notation and it will converted to a New Line from the function json():

json('{"NL":"\n"}')

 

And from the object (a Power Automate object) you get the property NL (you can change this name) value, .i.e the new line:

json('{"NL":"\n"}')?['NL']

Helpful resources

Announcements

Power Platform Connections - Episode 7 | March 30, 2023

Episode Seven of Power Platform Connections sees David Warner and Hugo Bernier talk to Microsoft MVP Dian Taylor, alongside the latest news, product reviews, and community blogs.     Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show!      Show schedule in this episode:    0:00 Cold Open 00:30 Show Intro 01:02 Dian Taylor Interview 18:03 Blogs & Articles 26:55 Outro & Bloopers    Check out the blogs and articles featured in this week’s episode:    https://francomusso.com/create-a-drag-and-drop-experience-to-upload-case-attachments @crmbizcoach https://www.youtube.com/watch?v=G3522H834Ro​/  @pranavkhuranauk https://github.com/pnp/powerapps-designtoolkit/tree/main/materialdesign%20components @MMe2K​ https://2die4it.com/2023/03/27/populate-a-dynamic-microsoft-word-template-in-power-automate-flow/ @StefanS365 https://d365goddess.com/viva-sales-administrator-settings/ @D365Goddess https://marketplace.visualstudio.com/items?itemName=megel.mme2k-powerapps-helper#Visualize_Dataverse_Environments @MMe2K    Action requested:  Feel free to provide feedback on how we can make our community more inclusive and diverse.    This episode premiered live on our YouTube at 12pm PST on Thursday 30th March 2023.    Video series available at Power Platform Community YouTube channel.    Upcoming events:  Business Applications Launch – April 4th – Free and Virtual! M365 Conference - May 1-5th - Las Vegas Power Apps Developers Summit – May 19-20th - London European Power Platform conference – Jun. 20-22nd - Dublin Microsoft Power Platform Conference – Oct. 3-5th - Las Vegas    Join our Communities:  Power Apps Community Power Automate Community Power Virtual Agents Community Power Pages Community    If you’d like to hear from a specific community member in an upcoming recording and/or have specific questions for the Power Platform Connections team, please let us know. We will do our best to address all your requests or questions.       

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.  Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik  Heartholme     AaronKnox  okeks      Matren   David_MA     Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365   Dorrinda   G1124   Gabibalaban   Manan-Malhotra   jcfDaniel   WarrenBelz   Waegemma   drrickryp   GuidoPreite    If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated. 

Register now for the Business Applications Launch Event | Tuesday, April 4, 2023

Join us for an in-depth look into the latest updates across Microsoft Dynamics 365 and Microsoft Power Platform that are helping businesses overcome their biggest challenges today.   Find out about new features, capabilities, and best practices for connecting data to deliver exceptional customer experiences, collaborating, and creating using AI-powered capabilities, driving productivity with automation—and building towards future growth with today’s leading technology.   Microsoft leaders and experts will guide you through the full 2023 release wave 1 and how these advancements will help you: Expand visibility, reduce time, and enhance creativity in your departments and teams with unified, AI-powered capabilities.Empower your employees to focus on revenue-generating tasks while automating repetitive tasks.Connect people, data, and processes across your organization with modern collaboration tools.Innovate without limits using the latest in low-code development, including new GPT-powered capabilities.    Click Here to Register Today!    

Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.   Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.      Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.

Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/   

Users online (1,746)