Hello Community,
I need your help please!
I've built a Flow that converts HTML to a PDF the Flow runs with no errors, but when I look at the PDF Document in the SharePoint Library, I only see the header and not any of the Table information.
This is my Flow
This is the HTML I have used and tested in w3schools
This is the PDF in my SharePoint Library, only showing the header.
Can anyone help as to why the table is not displaying
Thank you in advance for assistance,
Kind regards
Claire
Hello @Paulie78
In the Compose HTML, would I copy all my HTML within the input section?
I'm a little confused, where you have put TextGoesHere,
Would you mind clarifying this for me please,
Thank you
Claire
I'd just have a single compose with your HTML source in it. and then have place holders within it to represent values. Like ClairesValue1 etc. Then I would have a series of composes which just do a replace of the compose which contains the HTML, changing the place holders to the values you want.
The HTML concat method you are doing is entirely valid, just could end up being difficult to comprehend/maintain.
You were/are missing a closing single quote. Personally I would suggest a different approach to this concat method you are using. But this should fix your expression error:
concat(
'<!DOCTYPE html><html><head><style>table, th, td {border: 1px solid black;border-collapse: collapse;}th, td {padding: 15px;text-align: left;}table#t01 {width: 100%;background-color: #f1f1c1;}</style></head></body><h2> PFPE Trial: ',
variables('ObjectList')?['Title'],
'<h/h2><table style="width:100%"><tr><td>Twin Leg Fall Arrest Lanyard: Make</td><td>',
variables('ObjectList')?['TLFALMake'],
'</td></tr><tr><td>Twin Leg Fall Arrest Lanyard: Model</td><td>',
variables('ObjectList')?['TLFALModel'],
'</td></tr><tr><td>Twin Leg Fall Arrest Lanyard: Serial Number</td><td>',
variables('ObjectList')?['TLFALSerialNumber'],
'</td></tr><tr><td>Personal Fall Limiter: Make</td><td>',
variables('ObjectList')?['PFLMake'],
'</td></tr><tr><td>Personal Fall Limiter: Model</td><td>',
variables('ObjectList')?['PFLModel'],'</td></tr><tr><td>Personal Fall Limiter: Serial Number</td><td>',
variables('ObjectList')?['PFLSerialNumber'],'</td></tr><tr><td>Work Restraint: Make</td><td>',
variables('ObjectList')?['WRMake'],'</td></tr><tr><td>Work Restraint: Model</td><td>',
variables('ObjectList')?['WRModel'],'</td></tr><tr><td>Work Restraint: Serial Number</td><td>',
variables('ObjectList')?['WRSerialNumber'],
'</td></tr></table></body></html>'
)
Hello @Pstork1
Really sorry, I'm still getting an invalid expression message
I've believe I've corrected the change required, I've tried with a space after ] and without a space but still get the error
You fixed the closing table tag, but not the closing <h2> tag
Hello @Pstork1 ,
Thank you for coming back to me.
I'm not sure if I have updated the HTML in the correct places as I now get an invalid expression message when I try to copy this into the Expression,
This is what I changed it to, sorry new to HTML so appreciate any guidance.
concat('<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 15px;
text-align: left;
}
table#t01 {
width: 100%;
background-color: #f1f1c1;
}
</style>
</head>
</body>
<h2> PFPE Trial: ', variables('ObjectList')?['Title'],<h/h2>'
<table style="width:100%">
<tr><td>Twin Leg Fall Arrest Lanyard: Make</td><td>',variables('ObjectList')?['TLFALMake'],'</td></tr>
<tr><td>Twin Leg Fall Arrest Lanyard: Model</td><td>',variables('ObjectList')?['TLFALModel'],'</td></tr>
<tr><td>Twin Leg Fall Arrest Lanyard: Serial Number</td><td>',variables('ObjectList')?['TLFALSerialNumber'],'</td></tr>
<tr><td>Personal Fall Limiter: Make</td><td>',variables('ObjectList')?['PFLMake'],'</td></tr>
<tr><td>Personal Fall Limiter: Model</td><td>',variables('ObjectList')?['PFLModel'],'</td></tr>
<tr><td>Personal Fall Limiter: Serial Number</td><td>',variables('ObjectList')?['PFLSerialNumber'],'</td></tr>
<tr><td>Work Restraint: Make</td><td>',variables('ObjectList')?['WRMake'],'</td></tr>
<tr><td>Work Restraint: Model</td><td>',variables('ObjectList')?['WRModel'],'</td></tr>
<tr><td>Work Restraint: Serial Number</td><td>',variables('ObjectList')?['WRSerialNumber'],'</td></tr>
</table></body></html>')
I see two problems with the HTML at this point.
1) The closing tag on the title ism '<h/h2>' and it should just be </h2>'. If the title never closes the table may not show.
2) The Table doesn't have a </table> closing tag after the final row and before the closing </body> tag.
Change those two mistakes and try again. If there are still issues we can take a deeper look.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1