cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jainu
Frequent Visitor

footer for power automate html table

Hi Team,

I want to send a daily report from SharePoint list to crewmembers using power automate. I done that one  . I used 'Create HTML Table'  to create the table. I want to add some more data like 'Total Quantity', 'Total Area' etc. to the table as footer . Someone please suggest how can I add footer with some data into that HTML Table.

1 ACCEPTED SOLUTION

Accepted Solutions

@jainu 

Please try the below steps to insert Table Footer:

1. Add a compose data operation with a Split function to get the string before the closure of table </table> 

Mira_Ghaly_0-1635471153337.png

split(body('Create_HTML_table'),'</table>')

 

2. To get the Pre Table closure tag </table> Use below Expression

Mira_Ghaly_1-1635471304528.png

outputs('SplitByTableClosure')[0]

3. Compose your table footer using another compose operation where you add the required <td> Columns an there values as required:

Mira_Ghaly_2-1635471422855.png

 

4. Concatenate tBody output with tfooter output as below

Mira_Ghaly_3-1635471504472.png

concat(outputs('tbody'),outputs('tfoot'))

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

8 REPLIES 8
Mira_Ghaly
Dual Super User
Dual Super User

@jainu 

You can use compose data operation to append to your output of the HTML table something like below:

Mira_Ghaly_0-1635467097534.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
jainu
Frequent Visitor

Hi Mira,

I tried that way. But I need something like this.

jainu_0-1635468569344.jpeg

 

@jainu 

Please try the below steps to insert Table Footer:

1. Add a compose data operation with a Split function to get the string before the closure of table </table> 

Mira_Ghaly_0-1635471153337.png

split(body('Create_HTML_table'),'</table>')

 

2. To get the Pre Table closure tag </table> Use below Expression

Mira_Ghaly_1-1635471304528.png

outputs('SplitByTableClosure')[0]

3. Compose your table footer using another compose operation where you add the required <td> Columns an there values as required:

Mira_Ghaly_2-1635471422855.png

 

4. Concatenate tBody output with tfooter output as below

Mira_Ghaly_3-1635471504472.png

concat(outputs('tbody'),outputs('tfoot'))

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
jainu
Frequent Visitor

Hi Mira, 

the email report is coming like this.

 

jainu_0-1635476410573.png

 

@jainu 

Please make sure that you are using the Expression Pane when using any of the expressions as below:

Mira_Ghaly_0-1635476714572.png

Hope this helps!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
jainu
Frequent Visitor

@Mira_Ghaly 

 

Hi Mira,

 

 footer is showing an error when I write HTML Code in expression as shown below

jainu_0-1635477747188.png

 

@jainu 

For the tFooter you do not need an expression but still for sure you might need to use the Expression pane if you want to concatenate your totals.

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
jainu
Frequent Visitor

@Mira_Ghaly 

 

Yes. It is working. Thank you so much

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT 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.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,853)