cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Sending an email body text format

Hi,

 

We have moved all our data now from access to powerapps and sharepoint online.  What this seems to be missing is a simple way of creating a report based on the forms that have been created.  I have watched hours of videos on youtube and the only way to do this seems to be very complicated and include using flow. I'm surprised that such a great platform doesnt have a way to produce a simple report!?

 

In light of the above i belive the best way that i can send the report data to our clients is via a simple email.  I have created the button and i am in the middle of creating the email, however in the body i would like to have some of the writing large, some in bold etc etc.  I belive that html is required for this and if you press "," after filling out the body you get the choice of "IsHtml" I dont really understand how to use this function, can anybody assist as i cant find much info about this on the net?  The code below obviously doesnt work, however i hope you can see what im trying to achieve!?

Office365.SendEmail(
    ThisItem.Email_Address,
    "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & "  (Bell Ref: " & ThisItem.BellRef & ")", <font size="10"> "Bell Customer Report"</font> & Char(10) &
    <b>"Customer Name: "</b> & ThisItem.Customer_Forename & " " & ThisItem.Customer_Surname, {IsHtml:true}
    {Importance: "Normal"}
)

 

Any assistance appreciated!  - I understand, i'm probably approaching this in the wrong way, but if you can point me in the correct direction then i'm sure i'll work it out!

 

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @d3ell,

Based on the formula that you provided, I think there is something wrong with it.

Please modify your formula as below:

Office365.SendEmail(
       "email address here",
       "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename & "<br><b>Customer Surname: </b>"& Customer_Surname, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)

Note: The Char(10) and Char(13) function in PowerApps would not work in HTML code (as above). Please use the link break HTML tag (“<br>”) to identify where you want a new line character.

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Data-Table-to-Email-in-PowerApps/m-p/18...

 

More details about sending HTML email reporting in PowerApps, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Solution Supplier
Solution Supplier

There is comma missing between IsHtml and Importance. 

and all between one curly bracket

 

{IsHtml:true,Importance:"Normal"}

 

I've tried your suggestion, still getting lots of red squiggly lines (see attached screenshot)

 

Solution Supplier
Solution Supplier

change the field as required :

 

Office365.SendEmail(
TextInput6.Text,
"Customer Care Report for " & TextInput6.Text & " Plot " & TextInput6.Text & " (Bell Ref: " &TextInput6.Text & ")", "<font size=10> Bell Customer Report</font> "& Char(10) &"<b>Customer Name: </b>"& TextInput1.Text, {IsHtml:true,Importance: "Normal"}
)

Hi There,

 

The sqiggly red lines have gone now, however on the email when it is received it doesnt show the data from the currently selected item. - I have changed the code you gave me to Thisitem.CustomerName and nothing appears.  the code also now doesnt seem to be creating a new line with the Char(10) code.

 

Picture of email received attached - Any thoughts on this?

Solution Supplier
Solution Supplier

For new line use <br>.

 

please share your code so that we can check.

 

 

Office365.SendEmail(
"email address here",
"Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename <br><b>Customer Surname: </b>"& Customer_Surname, {IsHtml:true,Importance: "Normal"}
)

 

Any thoughts - I seem to be getting a lot of red squiggly lines again. See pic attached

Solution Supplier
Solution Supplier

Office365.SendEmail(
"emailaddress",
"Customer Care Report for " & TextInput1.Text& " Plot " & TextInput1.Text & " (Bell Ref: " &TextInput1.Text & ")", "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& TextInput1.Text &"<br><b>Customer Surname: </b>"& TextInput1.Text, {IsHtml:true,Importance: "Normal"}
)

Update field name as per your requirement. It is worknig at my end.

Hi @d3ell,

Based on the formula that you provided, I think there is something wrong with it.

Please modify your formula as below:

Office365.SendEmail(
       "email address here",
       "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename & "<br><b>Customer Surname: </b>"& Customer_Surname, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)

Note: The Char(10) and Char(13) function in PowerApps would not work in HTML code (as above). Please use the link break HTML tag (“<br>”) to identify where you want a new line character.

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Data-Table-to-Email-in-PowerApps/m-p/18...

 

More details about sending HTML email reporting in PowerApps, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (74,765)