Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

add new line in string

Like (2) ShareShare
ReportReport
Posted on 11 Jun 2020 11:34:57 by

Hi

I want to add new line sting which are displaying on label in power app.

In below code I am using char(10) but it is not working.

 

Concatenate("Hello ",lbl_approvervalidationlogic.Text,   ", "   ,Char(10) , "You have been selected as an approver")

 

Please note , using this code  to assign value in variable and label in canvas app.

 

Regards,

Lalit Kadam

 

Categories:
  • AsaadBLK Profile Picture
    2 on 24 Nov 2022 at 15:44:44
    Re: add new line in string

    Thanks

  • Juanma Profile Picture
    on 27 Oct 2022 at 14:42:02
    Re: add new line in string

    Concatenate("Hello ",lbl_approvervalidationlogic.Text,   ", "   ,Char(13) , "You have been selected as an approver")

    is functional on a label too

  • skydivertak Profile Picture
    64 on 08 Dec 2021 at 19:08:43
    Re: add new line in string

    I have found that if you target both browser and mobile, it seems that you need both Char(10) & "<br>" together.  The browser is ignoring the Char(10) and mobile (at least iOS) ignores the "<br>". I don't have Android or Windows PowerApps application.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 26 Jun 2020 at 04:02:19
    Re: add new line in string

    Hi @Anonymous ,

    I am following up this post to see if it can be closed if you obtained the result you were looking for.

    Please click Accept as solution if my post helped you solve your issue as this will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 15 Jun 2020 at 11:16:14
    Re: add new line in string

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 12 Jun 2020 at 05:10:17
    Re: add new line in string

    Thanks @v-bofeng-msft ,

    That is pretty much what I said.

  • Verified answer
    v-bofeng-msft Profile Picture
    on 12 Jun 2020 at 01:56:58
    Re: add new line in string

    Hi @Anonymous :

    Do you want to split a string into two lines?

    I thought of a convenient method, that is to use the HTML Text control.We can use the <br> tag in the HTML Text control to achieve line breaks.

    I've made a test for your reference:

    1\Add a Html Text control:

    HtmlText:

     

    "Hello "&lbl_approvervalidationlogic.Text & ",<br>" & "You have been selected as an approver"

     

    1.JPG

    Best Regards,

    Bof

  • Verified answer
    WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 11 Jun 2020 at 12:00:07
    Re: add new line in string

    Hi @Anonymous ,

    That should work as Text - you can also try Char(13), but I have tested as below

    LabelTestBreak.png

    Also if you are using this ultimately in an email body, try <br> instead. If you use Office365Outlook.SendEmailV2, it will automatically pick up and render the HTML line break.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard