Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Include a list of records in the body of any email



I've got a very simple quoting application, three SharePoint Online custom lists, quotes, quoteitems and products.

All working ok to create and edit quotes with products, sum the quote etc.


I like to email the quote, mail address is a field in the quotes list, I can't see anyway to include filter the table and include the quoteitems records in an html table of the body of an email.


Thoughts anyone? Need to be able to loop though the records or create a text table.


I'd then be able to print the email to get around the no printing from PowerApps issues.

Community Champion
Community Champion

Re: Include a list of records in the body of any email



I learnt this in Project Siena and let me share the link. I had made changes, too and get it done but under Win 10 environment.

(It failed in Android and iOS. I am still trying out and if you are able to get it done, please share)


Launch(Concatenate("mailto:emailaddress?subject=YourSubject". "&Body=",BodyText, ...., "%0A%0A", .....BodyText, and can combine with Concat(Table, FieldName, %0A%", ...)


I can't paste here the link (My computer maybe problem). Please search in Project Siena forum, by StonyArc and Ayuba (MS).


Hope this helps.

Not applicable

Re: Include a list of records in the body of any email

  • galTrackingSteps is a Gallery
  • ReportItem is a collection
  • SMProfile is a collection I use as a local profile.

    The key to building the table body <tbody> is the "Concat(galTrackingSteps.AllItems,.......)"
    function. It acks like a "ForEach..."


The following code is included in the "OnSelect" of a Email icon.



UpdateContext({EmailHtml:{Subject:"Sample Report of " & First(ReportItem).Title ,Body: "<div style=""text-align:center""> <img src=""https://b2slifesc..../b2slifesciences.jpg"" alt=""B2S Logo""></div>" & "<h1>"& "<span style=color:rgb(35,55,141)>" & "Sample: </span>" & "<span style=color:rgb(228,108,11)>" & First(ReportItem).Title & "</span>" & "</h1>" & "<h2>" & "<span style=color:rgb(35,55,141)>Project: </span>" & "<span style=color:rgb(228,108,11)>" &tbProjectName.Text & "</span></h2>" & "<h3 style=color:rgb(35,55,141)>Tracking Steps</h3>"& "<table border=""1"" style=""width=90%"">"& "<thead><tr>" & "<th> "& Last(galTrackingSteps.AllItems).tbLocation.Text&"</th>"& "<th>"& Last(galTrackingSteps.AllItems).tbDate.Text & "</th>" & "<th>" & Last(galTrackingSteps.AllItems).tbVolume.Text & "</th>" & "<th>" & Last(galTrackingSteps.AllItems).tbPreparedBy.Text & "</th>" & "</tr></thead>" & "<tfoot></tfoot>"&" <tbody>" & Concat(galTrackingSteps.AllItems, "<tr><td>" & tbHeading3Location & "</td><td>" & tbSubTitleDateMoved & "</td><td style=""text-align:right"">" & tbTrackingStepVolume & " " & tbTrackingStepVolumeUnit & "</td><td>" & tbSubtitlePreparedBy &"</td></tr> ") &"</tbody>"&"</table>" &"<h3 style=color:rgb(35,55,141)>Aliquot(s)</h3>" &"<table style='width=90%'>"&"<thead><tr><th>Sample</th><th>Volume</th></tr></thead><tbody> "& Concat(galChildren.AllItems, "<tr><td>"& tbChildrenSample &"</td><td style=""text-align:right"">" & tbChildVolume & " "& tbChildrenVolumeUnits & "</td></tr>") & "</tbody></table>" & "<h3 style=color:rgb(35,55,141)>Pooled</h3>" & "<table style='width=90%'><thead><tr><th>Sample</th><th>Volume</th></tr></thead><tbody>"& Concat(galParents.AllItems, "<tr><td> "& tbParentSample &"</td><td style=""text-align:right"">" & tbParentVolume & " " & tbParentVolumeUnits & "</td></tr>")&"</tbody></table>" }}); Office365.SendEmail(addressie, EmailHtml.Subject, EmailHtml.Body, {IsHtml: true})






Helpful resources


Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!


Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)


Community Highlights

Check out whats happening in Power Apps


Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,946)