cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tianaranjo
Continued Contributor
Continued Contributor

Html text to email - multiple tables

Greetings, 

I created a Gantt chart:

  • 1 - HTML Text control
    • 3 tables within the control for each 'bar'

I would like to email the results via PowerApps Office365 datasource:

Office365.SendEmail("name@bnsf.com","Gantt",
eMailText3_1.HtmlText,
{IsHtml: true}
)

This (almost) works. Gantt piece works great.  And the first table emails as intended.  However, the other tables do not pass into email correctly. 

The two screen shots show the Gantt in PowerApps and the email that is currently sent.**Note - in order for the Gantt to line up correctly, multiple tables are required.

image.pngThe HTML text is: 

" <table border='0' cellpadding='0' cellspacing = '0' style='border:0px solid white; border-collapse:collapse'width = '100%' " & 
        "<tr>" &
            "<td 
                style = 'background-color: #ffffff'
                width = ' 10%' 
            > 
                Slow Order: "&Start1_1.Text&"
            </td>" & 
            
            "<td style = height:'25px' width =' "& w_t2c2_3 & " %'>" &
                Concat(colGanttPrimaryLine, " <img src=" & Thumbnail.Large& " width = ' " & imgSrcWidth_2 & "' height = '20'; "">" ) & 
            "</td>"  &  

            "<td style = 'background-color: #ffffff' width = ' ' >" & 
                End1_1.Text & " 
            </td>" &
        "</tr>" & 
"</Table>" &

"<table border='0' cellpadding='0'cellspacing = '0' style='border:0px solid white; border-collapse:collapse width = '100%' " & 
        "<tr>" &
            "<td style = 'background-color: #ffffff'width = ' "& wt2c1_1 &"  %'>
                Input 1: "&Start2_1.Text&"
            </td>" & 
            "<td style = height: '25px'width =' "& w_t2c2_3 & " %'>" &
                Concat(colGanttLine1, " <img src=" & Thumbnail.Large& " width = ' " & imgSrcWidth & "' height = '20'; "">" ) & 
            "</td>"  &  
            "<td style = 'background-color: #ffffff'width = ' ' >" & 
                 End2_1.Text & " 
            </td>" &
        "</tr>" & 
"</Table>" &

"<table border='0' cellpadding='0'cellspacing = '0' style='border:0px solid white; border-collapse:collapse'width = '100%' " & 
        "<tr>" &
            "<td style = 'background-color: #ffffff'width = ' "& w_t3c1_1 &"  %' >
                Input 2: "&Start3_1.Text&"
            </td>" & 
            "<td width =' "& w_t3c2_1 & " %'>" &
                Concat(colGanttLine2, " <img src=" & Thumbnail.Large& " width = ' " & imgSrcWidth_1 & "' height = '20'; "">" ) & 
            "</td>"  &  
            "<td style = 'background-color: #ffffff'width = ' ' >" & 
                 End3_1.Text & " 
            </td>" &
        "</tr>" & 
"</Table>" 

 

 

6 REPLIES 6
tianaranjo
Continued Contributor
Continued Contributor

 

Are you sure your Concat syntax is ok. I see the double quote is not closed before last semicollon:

Concat(colGanttLine2, " <img src=" & Thumbnail.Large& " width = ' " & imgSrcWidth_1 & "' height = '20'; "">" )

I'ld open received mail message source and look if it contains what you generated. Maybe it is just HTML syntax issue which causes tables are not rendered by email client.

 

Mick

 

 

tianaranjo
Continued Contributor
Continued Contributor

Raising this to the top hoping to catch the attention of the likes of @CarlosFigueira 🙂 
Or @v-xida-msft since you answered one along these lines elsewhere  

 Or anybody else who might know.  

@Mickyw - thanks for the reply but that doesn't seem to be the issue.  

tianaranjo
Continued Contributor
Continued Contributor

Please disregard - I figured it out.  The results shown here.  First image is from the PowerApp, second is the email result.image.pngimage.png

Hi @tianaranjo

 

I think important value of such community forums like this is to provide solution if it exists. Even if you were able sort it out on your own or it was you mistake or something else - others looking for simillar issues might benefit from your experience. 

 

Regards,

Mick

tianaranjo
Continued Contributor
Continued Contributor

@Mickyw I totally agree; I have learned so much from this community.  I will share the solution soon; currently we are trying to fine tune and release this app on a tight timeline. So we are feverishly working to get it out the door.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,239)