Hi,
Has anyone been able to format powerapp form data in a table in an email?
Thank you
Solved! Go to Solution.
Hi @anthjanz,
Do you want to send data from the form into a html table with an email?
Could you please share a bit more about your scenario, do you have an edit form to submit data?
Actually, it is easy to achieve this in Power Apps, all your need is to add a HTML text input, please check as below.
1). If you have an edit form to submit data, please set the submit button as below:
SubmitForm(Form4);
Office365Outlook.SendEmailV2(
"
QiQiao@xxx.onmicrosoft.com",
"Notify",
HtmlText4.HtmlText
)
2). Add a Html Text input and set the HtmlText property as below:
"<strong> Information: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
<th>Title</th> <th> Name </th><th> Score </th>
</tr>" & "<tr>
<td>" & Form4.LastSubmit.Title & " </td>
<td>" & Form4.LastSubmit.Name & " </td>
<td>" & Form4.LastSubmit.Score & " </td>
</tr>" & "</table>"
Note that Form4 is my edit form.
Here is the test result:
You can do this using the HTML text control. Create a HTML template that you inject your form values into. You can then use the HTML text as the content for your email.
Sorry Digital, I'm a new to all this. Are you talking about something that can be done in Powerapps?
is there any code you could post?
Cheers
Yes in Power Apps.
Your best bet would be to watch this video. Shane Young's YouTube channel is a great resource for starting out with this stuff and he explains it way better than I could here.
https://www.youtube.com/watch?v=vpYkOccwn4Y&ab_channel=ShaneYoung
Hi @anthjanz,
Do you want to send data from the form into a html table with an email?
Could you please share a bit more about your scenario, do you have an edit form to submit data?
Actually, it is easy to achieve this in Power Apps, all your need is to add a HTML text input, please check as below.
1). If you have an edit form to submit data, please set the submit button as below:
SubmitForm(Form4);
Office365Outlook.SendEmailV2(
"
QiQiao@xxx.onmicrosoft.com",
"Notify",
HtmlText4.HtmlText
)
2). Add a Html Text input and set the HtmlText property as below:
"<strong> Information: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
<th>Title</th> <th> Name </th><th> Score </th>
</tr>" & "<tr>
<td>" & Form4.LastSubmit.Title & " </td>
<td>" & Form4.LastSubmit.Name & " </td>
<td>" & Form4.LastSubmit.Score & " </td>
</tr>" & "</table>"
Note that Form4 is my edit form.
Here is the test result:
Thanks Qi, that was very helpful!