Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Multilines To separate rows

(0) ShareShare
ReportReport
Posted on by 31

I have created a canvas power app and there is a multiline field. The app is designed in a way that when the form is submitted it triggers an email to predefined recipients. The multiline entry comes out as a paragraph in the email instead of getting separated in rows. 

I am attaching an example of how the result comes. And also attaching the Power App code for the screen. 

IMG_0409.jpeg

IMG_0408.jpeg

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    YOU ARE A GENIUS !!! It worked perfectly.

    HimanshuJha_0-1713252033503.png

     

  • WarrenBelz Profile Picture
    146,700 Most Valuable Professional on at
    Re: Multilines To separate rows

    @HimanshuJha ,

    Yes except you have mis-spelt Substitute

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    HimanshuJha_1-1713250714070.png

    Is this the correct way @WarrenBelz. Just to show you I have corrected it in word file. 

  • Verified answer
    WarrenBelz Profile Picture
    146,700 Most Valuable Professional on at
    Re: Multilines To separate rows

    @HimanshuJha ,

    This is an example for Reason

    <p>" & 
     Substitute(
     ReasonFormEscalation.Text,
     Char(10),
     "<br>"
     ) & 
    "</p>

    Do the same for Remarks.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    @WarrenBelz can you please help me rewrite? So that the “Remarks” and “Reason” fields that are submitted as multiple lines in the application comes out as multiple line in the email. 

    Rest everything can be kept the way it is. 

  • WarrenBelz Profile Picture
    146,700 Most Valuable Professional on at
    Re: Multilines To separate rows

    @HimanshuJha ,

    There is nothing wrong with the HTML you have posted (you have a lot of <p> paragraph tags) - I think your issue is in the Text input controls that you are referencing.

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    I mistakenly accepted it as a solution @Griffin_C. I still need help.

    To explain better, kindly check the screenshot "3" that shows how the app interface looks like. When the email is sent out, the "remarks" and "reason" section should come out in multiple lines and not in paragraph.


  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    @WarrenBelz To give you detailed information on what I trying to do: 
    Our technicians fill the fields in the application and the email is automatically sent to the designated mailboxes. The application interface is shown in screenshot "3". When filling the details, "Remarks" and "reason" section should come in multi lines rather than paragraphs.
    Apologies for asking so many questions but I badly need some help here.

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    @Griffin_C I am providing you the current code that I am using. Can you please make the required changes and send it to me. Would be a great favor. 

    If(IsBlank(TicketNumberFormEscalation.Text)

    Or IsBlank(ClientATTUIDFormEscalation.Text)

    Or IsBlank(ContactNumberFormEscalation.Text)

    Or IsBlank(ReasonFormEscalation.Text)

    Or IsBlank(RemarksFormEscalation.Text),

     

        SubmitForm(FormEscalation);

        Refresh(lista_tickets)

    ,

        Office365Outlook.SendEmail("escalations.att@dxc.com, attgsdindiasmemb@dxc.com, attgsdindiasme@dxc.com",

        "Escalation - Ticket: " & TicketNumberFormEscalation.Text,

        "<h2>New ticket generated&nbsp;</h2>

        <p><br />Ticket Number: "& TicketNumberFormEscalation.Text &"</p>

        <p>Client ATTUID: "& ClientATTUIDFormEscalation.Text &"</p>

        <p>Contact Number: "& ContactNumberFormEscalation.Text &"</p>

        <p>Reason:</p>

        <p>"& ReasonFormEscalation.Text &"</p>

        <p>&nbsp;</p>

        <p>Remarks (Opt.):</p>

        <p>"& RemarksFormEscalation.Text &"</p>

        <p>&nbsp;</p>

        <p>Created by: "& UsuáriosdoOffice365.MyProfileV2().displayName &" / "& UsuáriosdoOffice365.MyProfileV2().mail &"</p>

        <p>&nbsp;</p>

        <p>Sent automatically by Helpdesk Operator App.</p>",{IsHtml:true});

     

        SubmitForm(FormEscalation);

     

        Navigate(ScreenMenu);

     

        Refresh(lista_tickets)

    )



    Please see attached app interface and email output as well

  • HimanshuJha Profile Picture
    31 on at
    Re: Multilines To separate rows

    @WarrenBelz I changed the code as you suggested but the emails are still coming in paragraph. I am adding the new code, the email output and the application screenshot with multiline entries showing how I am providing the fields.

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard