cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
whitemast1
Level: Powered On

Adding rows to a HTML table

Hi all, 

 

I'm currently working on a project to extract multiple records from the same SharePoint list based on 3 different sets of conditions. I have considered using HTML tables in the data operation as a means to temporarily store the filtered records.

 

I have tried reading up the following link: 

https://powerusers.microsoft.com/t5/Building-Flows/Group-multiple-Excel-rows-into-an-HTML-table/m-p/...

 

However, I am unable to output the completed table and am just getting individual records being sent back to me. Can anyone tell me what I'm doing wrongly? 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Adding rows to a HTML table


@whitemast1 wrote:

In the post, it seems that the user was able to get the full list of items. However, I end up with many emails with a single record attached to it instead. 


I see that you are not currently utilizing the Get Columns by View option within the Get items step. Setting up a specific view for the list with the exact columns that you require and then adding that view in this option may fix your issue. If that isn't the case, then the issue lies within your logic somewhere. 


@whitemast1 wrote:

I also have a part 4 where I have to add more rows into the already created HTML table. How should I accomplish this? 


That is not something that you would easily accomplish within the same Flow. The problem is that you'd need to comprehend the first HTML table's code, then inject your new code into it in further steps - adding complexity to an already fairly complex Flow.

It would likely make your life a lot easier to first compile all of your required data in a list, and then export it. Have you considered utilizing a "jump list" to compile all of your compose steps into a master updated list, then simply generating the HTML file as the final step from that list?

I use these jump lists any time I am combining data from multiple lists or sources. I like to modularize/compartmentalize my Flows to make growth, expansion and troubleshooting easier.

SharePoint lists are perfect for this. Think of it as having a "compile" list(s) and Flow, and an "execute" list and Flow.

👨🏻‍💻 If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Adding rows to a HTML table

Please see Obtaining a filtered SharePoint List based off a column, which talks about how to work with OData Filter under Microsoft Flow SharePoint Get-Items Action. You may also utilize the Use filter array action and the Filter an array or collection blog post, by @Pieter_Veenstra may be of some use. 

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

👨🏻‍💻 If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

whitemast1
Level: Powered On

Re: Adding rows to a HTML table

Dear Brad, 

 

Thanks for the suggestions. However, the links don't exactly help my situation. Please see the screen shots of process that I am currently trying to implement. I have essentially a 4 part process. the first 3 parts are shown below: 

  1. Get 2 separate lists of items from the same list (I have no major issues here). 
  2. Check for which IDs I need to copy into a table. (I followed the previous link that I posted and got an array of the IDs) 
  3. Filter the first list based on the ID array and create a HTML table. (This is where the problem happens) 

In the post, it seems that the user was able to get the full list of items. However, I end up with many emails with a single record attached to it instead. 

I also have a part 4 where I have to add more rows into the already created HTML table. How should I accomplish this? 

 

 Part 1.PNGCollecting 2 different sets of information from the same SharePoint listPart 2.PNGCompare both lists for exact match and copy their IDs into a arrayPart 3.PNGCreating a temporary HTML table with items selected based on the ID from part 2 's array

Super User
Super User

Re: Adding rows to a HTML table


@whitemast1 wrote:

In the post, it seems that the user was able to get the full list of items. However, I end up with many emails with a single record attached to it instead. 


I see that you are not currently utilizing the Get Columns by View option within the Get items step. Setting up a specific view for the list with the exact columns that you require and then adding that view in this option may fix your issue. If that isn't the case, then the issue lies within your logic somewhere. 


@whitemast1 wrote:

I also have a part 4 where I have to add more rows into the already created HTML table. How should I accomplish this? 


That is not something that you would easily accomplish within the same Flow. The problem is that you'd need to comprehend the first HTML table's code, then inject your new code into it in further steps - adding complexity to an already fairly complex Flow.

It would likely make your life a lot easier to first compile all of your required data in a list, and then export it. Have you considered utilizing a "jump list" to compile all of your compose steps into a master updated list, then simply generating the HTML file as the final step from that list?

I use these jump lists any time I am combining data from multiple lists or sources. I like to modularize/compartmentalize my Flows to make growth, expansion and troubleshooting easier.

SharePoint lists are perfect for this. Think of it as having a "compile" list(s) and Flow, and an "execute" list and Flow.

👨🏻‍💻 If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,357)