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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sending Gallery Data t...
Power Apps
Answered

Sending Gallery Data to Outlook Not Passing Through

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hi All,

 

Obviously this question has been answered a lot of times over here, but unfortunately, none of the solutions are working with my set up and if any of you encountered the same issue and got a solution, I really appreciate your help.

 

So, I have the following set up of my power app:

 

The Outlook and my Collection are source of my data.

 

I have a Vertical Gallery where I want the user to fill up some fields and after clicking on Submit, I would like the data coming on my email in a formatted table.

 

So, my "+" add icon, to add a new gallery item is set up as follow:

Collect(
 DetailCollection,
 {
 Id: Text(Last(DetailCollection).Id + 1),
 Sitename: "",
 Maker: "",
 Model: "",
 Capacity: "",
 Rrp: "",
 Currency: "",
 Accidental: "",
 Liquid: "",
 Theft: ""
 }
)

 

After the user add as many gallery items as is needed, I placed a Submit button where the set up is as follow:

Office365Outlook.SendEmailV2("myemail@example.com", "Table Update",
"<table width='100%' border='1' cellpadding='5' style='border: 1px solid #000; border-collapse: collapse'>"&"<tr>
<th>Site</th>
<th>Maker</th>
<th>Model</th>
<th>Capacity</th>
<th>RRP</th>
<th>Currency</th>
<th>Accidental & Breakdown</th>
<th>Liquid Damage</th>
<th>Theft & Loss</th>
</tr>
<tr>"& Concat(
 DetailCollection,
"<td>"& Sitename &"</td>"&
"<td>"& Maker &"</td>"&
"<td>"& Model &"</td>"&
"<td>"& Capacity &"</td>"&
"<td>"& Rrp &"</td>"&
"<td>"& Currency &"</td>"&
"<td>"& Accidental &"</td>"&
"<td>"& Liquid &"</td>"&
"<td>"& Theft &"</td>",
"</tr><tr>"
)&"</table>")

 

All items are text field where any word or number can be placed in.

 

I have no errors with the set up, the table with the headers are being sent to the email, but not the data from the fields.

 

Any help is appreciated.

 

Kind regards,


Fernando

 

 

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @fernandosilva 

     

    1. The Concat part of your code doesn't look right

    2. You should build that part of the table outside the Email connector.

     

    So in the OnSelect property of your button:

     

     

    ForAll(
     DetailCollection,
     Collect(
     col_EmailTable,
     {
     tbl: "<tr><td>" & Sitename & "</td><td>" & Maker & "</td><td>" & Model & "</td><td>" & Capacity & "</td><td>" & Rrp & "</td><td>" & Currency & "</td><td>" & Accidental & "</td><td>"& Liquid & "</td><td>" & Theft & "</td></tr>"
     }
     )
    )

     

     

     

    Then to send the email:

     

     

    Office365Outlook.SendEmailV2("myemail@example.com", "Table Update",
    "<table width='100%' border='1' cellpadding='5' style='border: 1px solid #000; border-collapse: collapse'><tr>
    <th>Site</th>
    <th>Maker</th>
    <th>Model</th>
    <th>Capacity</th>
    <th>RRP</th>
    <th>Currency</th>
    <th>Accidental & Breakdown</th>
    <th>Liquid Damage</th>
    <th>Theft & Loss</th>
    </tr>" & Concat(col_EmailTable, tbl, "") & "</table>"
    )

     

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @fernandosilva,

    Is there any valid field value in your Gallery or collection?

    I think you should add Gallery items directly instead of the collection, I don't see any valid value in your collection.

     

    I strongly suggest you use a HtmlText control to write the html text and use the HtmlText control data directly in your email.

    Set your HtmlText's HtmlText:  (I assume that the HtmlText control named HtmlText1)

    "<table width='100%' border='1' cellpadding='5' style='border: 1px solid #000; border-collapse: collapse'>"&"<tr>
    <th>Site</th>
    <th>Id</th>
    <th>Model</th>
    <th>Capacity</th>
    <th>RRP</th>
    <th>Currency</th>
    <th>Accidental & Breakdown</th>
    <th>Liquid Damage</th>
    <th>Theft & Loss</th>
    </tr>
    <tr>"& Concat(
     Gallery8.AllItems,
    "<td>"& Title12.Text &"</td>"&
    "<td>"& SubTitle12.Text &"</td>"&
    "<td>"& Body3.Text &"</td>"&
    "<td>"& Capacity_lbl.Text &"</td>"&
    "<td>"& Rrp_lbl.Text &"</td>"&
    "<td>"& Currency_lbl.Text &"</td>"&
    "<td>"& Accidental_lbl.Text &"</td>"&
    "<td>"& Liquid_lbl.Text &"</td>"&
    "<td>"& Theft_lbl.Text &"</td>",
    "</tr><tr>"
    )&"</table>"

    Then send email :

    Office365Outlook.SendEmailV2("myemail@example.com", "Table Update",HtmlText1.HtmlText)

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @v-qiaqi-msft ,

     

    Your solution worked flawlessly. Very good and thank you very much for taking the time of replying.

    I hope it helps other users as well.

     

    Thank you,


    Fernando Silva

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard