cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SUPRIYAK
Helper III
Helper III

Pdf of a powerapp gallery using HTML

Hi,

 

I got to know that to generate a PDF of a bigger scrollable power app gallery, I need to write HTML code first in the power app, then run a flow in power automate.

Please suggest how to write HTML code for the collection of gallery items in the power app.

 

Suppose I have denoted S.No in the gallery as 'ThisItem.S_No'. Then how do mention this in the HTML code?

 

Kindly help.

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
PowerGirl
Resolver I
Resolver I

Hello Supriyak,

 

I needed to do something similar before. I found this video from Shane Young super helpful.

 

PowerApps PDF from table data - YouTube

 

I hope it helps!

View solution in original post

PowerGirl
Resolver I
Resolver I

Concat(Sort(Clc_Outage_list,<column name>,ascending),

View solution in original post

PowerGirl
Resolver I
Resolver I

Hi,

 

you can find how to build a table in HTML in here. HTML Tables (w3schools.com) each table should be separated, starting with <Table> here is your table and then finish it with </Table>. If you want another table start again <Table> here is your table and then finish it with </Table>

View solution in original post

9 REPLIES 9
phipps0218
Super User
Super User

@SUPRIYAK what are you trying to achieve with the PDF viewer?

PowerGirl
Resolver I
Resolver I

Hello Supriyak,

 

I needed to do something similar before. I found this video from Shane Young super helpful.

 

PowerApps PDF from table data - YouTube

 

I hope it helps!

@phipps0218  I want to basically import the whole gallery of powerapps into HTML text. so that I can generate the Pdf of the gallery.

My gallery looks like something this:

SUPRIYAK_0-1658132137987.png

I want PDF of Outage activities section. In that gallery, Line items are fetched from shaepoint list. I want to write the code in HTML text so that I can get all the content of this gallery in table format.

Thanks, @PowerGirl This video helped me & I did what I actually wanted.

Thanks again for guiding.

 

Just one thing, I am stuck on how to use concat with Sort. Because I am able to get dynamic table from the gallery but It is coming in descending order.

 

Here is my HTML code:

 

"<!DOCTYPE html>
<html>
<body>
<Table width='100%' border='1' cellpadding='5' style='border:0px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<td align='left'><b>S_No.</b></td>
<td align='left'><b>Response<b></td>
<td align='left'><b>Particulars of events <b></td>
<td align='left'><b>Status<b></td>
<td align='left'><b>Time<b></td>
<td align='left'><b>Remarks<b></td>
</tr>"
& Concat(Clc_Outage_list,
"<tr>
<td>" & S_No & " </td>
<td>" & Res_Dept & " </td>
<td>" & Check_Para & " </td>
<td>" & Radio1.Selected.Value & " </td>
<td>" & Time_Stamp & " </td>
<td>" & Remarks & " </td>
</tr>")

&
"
</table>"&"
</body>
</HTML>
"

 

& below is the output:

 

SUPRIYAK_0-1658145181287.png

I want this sequence in ascending order.

PowerGirl
Resolver I
Resolver I

Concat(Sort(Clc_Outage_list,<column name>,ascending),

SUPRIYAK
Helper III
Helper III

thanks a lot.. its working now

SUPRIYAK
Helper III
Helper III

One more help pls....

If I want to add two tables from different galleries in a same pdf, then how to achieve that:

 

I have tried the below code in HTML but it is generating pdf of only first table:

 

 

"<!DOCTYPE html>
<html>
<body>

<h2>Isolation Points for " & Var_Eqp_Selected_1 &" </h2>
<Table width='100%' border='1' cellpadding='5' style='border:0px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<td align='left'><b>Safety tag</b></td>
<td align='left'><b>Nos.<b></td>
<td align='left'><b>Location<b></td>
</tr>"

& Concat(Sort(Filter(Clc_inst, !IsBlank('Safety tag')),ID,Ascending),
"<tr>
<td>" & 'Safety tag' & "</td>
<td>" & Isolation_No &" </td>
<td>" & 'ISO Location' & " </td>


</tr>")
&
"
<h2>Outage Activities for " & Var_Eqp_Selected_1 &" </h2>
<p><b>User: "& TextInput3 &" </b></p>
<Table width='100%' border='1' cellpadding='5' style='border:0px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<td align='left'><b>S_No.</b></td>
<td align='left'><b>Response<b></td>
<td align='left'><b>Particulars of events <b></td>
<td align='left'><b>Response<b></td>
<td align='left'><b>Time<b></td>
<td align='left'><b>Remarks<b></td>

</tr>"

& Concat(Sort(Clc_Outage_list,S_No,Ascending),
"<tr>
<td>" & S_No & " </td>
<td>" & Res_Dept & " </td>
<td>" & Check_Para & " </td>
<td>" & Response & " </td>
<td>" & Time_Stamp & " </td>
<td>" & Remarks & " </td>

</tr>")

&
"
</table>"&"
</body>
</HTML>
"

 

Please help ASAP

PowerGirl
Resolver I
Resolver I

Hi,

 

you can find how to build a table in HTML in here. HTML Tables (w3schools.com) each table should be separated, starting with <Table> here is your table and then finish it with </Table>. If you want another table start again <Table> here is your table and then finish it with </Table>

Thanks a lot

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,281)