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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,037)