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 Apps
Answered

Email / Printing

(0) ShareShare
ReportReport
Posted on by 209

Hello,

I have a gallery which works as it should and filters out the multiple pieces of information I need but............ I Know printing from Powerapps can be a bit difficult so I was wondering is there is anyway I can press a button on my powerapp and the results from my gallery can be emailed to a pre-set email address?

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Station1901 ,

    Do you want to use data in a gallery as email body?

    If so, the key point is how to write the email body  by using html text. (Use html text to represent the data in the gallery.)

    Firstly, save the data in the gallery as a collection.

    ClearCollect(collection1,gallery1.AllItems)

    Secondly, send a table by using html text:

    Office365.SendEmail(
     "email address",
     "subject",
     "<h3>tablename</h3>" &
     "<strong> Items: </strong>" &
     "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef'>
     <th>fieldname1</th> <th> fieldname2 </th> <th> fieldname3 </th><th> fieldname4 </th>
     </tr>
     <tr>" &
     Concat('The data source/formula that you provided within the Items property of your Data Table control',
     "<td>" & fieldname1 & " </td>
     <td>" & fieldname2 & " </td>
     <td>" & fieldname3 & " </td>","</tr><tr>") &
     "</table>",
     {
     IsHtml:true
     }
    )

    Please replace the tablename,data source, field names in your issue.

     

     

    Here's a similar issue in details for your reference:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-email-a-collection-as-attachments/td-p/328061

     

     

    Best regards,

  • Station1901 Profile Picture
    209 on at

    Thanks for this.  The email side is what I am looking for but my Gallery shows multiple results and I'd like the email to contain all of these results not just single textboxes.

  • eka24 Profile Picture
    20,923 on at

    Watch this video from Shane Young:

    https://youtu.be/bF7WkqtxKB0

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard