web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multilines To separate...
Power Apps
Unanswered

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

Categories:
I have the same question (0)
  • Griffin_C Profile Picture
    125 on at

    I'm assuming that the issue you're having is that there are line breaks within your text inputs that don't show up in the email body. To do this, you'll need to use the Substitute function to reference both types of line breaks and replace them with "<br>"

    It's very hard to read your screenshot, but I'm assuming your text inputs are "ReasonFormEscalation.Text" and "RemarksFormEscalation.Text" if so, those parts of your SendEmail function should look like this:

     

     Substitute(
     Substitute(
     ReasonFormEscalation.Text,
     Char(13),
     "<br>"
     ),
     Char(10),
     "<br>"
     )

     

    "Char(13)" and "Char(10)" are how Power Apps defines line breaks and paragraph breaks, I can't remember which is which, but it's safe to use two Substitute functions to replace any with <br> in the email body.

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @HimanshuJha ,

    Try using SendEmailV2 - that will properly convert your HTML text.

     

    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

    Hello Warren,

    I am very new to power apps. If you don’t mind, can you please mention which part of my code should be replaced with the solution you’re giving. Also, please write the corrected code. 

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @HimanshuJha ,

    Simply add V2 on the end  -  Office365Outlook.SendEmailV2

  • HimanshuJha Profile Picture
    31 on at

    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)

    )

    Above is how the current code looks like.

    Do you suggest that I replace the texts in red with below keeping the rest same:
    Office365Outlook.SendEmailV2("escalations.att@dxc.com, attgsdindiasmemb@dxc.com, attgsdindiasme@dxc.com",

     

  • HimanshuJha Profile Picture
    31 on at

    @WarrenBelz please confirm if above solution is what you were suggesting. I will rewrite the code right now, if you approve, and then provide you a quick update.

  • HimanshuJha Profile Picture
    31 on at

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

  • HimanshuJha Profile Picture
    31 on at

    @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

    @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

    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.


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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard