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

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


@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

4 REPLIES 4
Brad_Groux
Community Champion
Community Champion

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 👍.

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? 

 

 Collecting 2 different sets of information from the same SharePoint listCollecting 2 different sets of information from the same SharePoint listCompare both lists for  exact match and copy their IDs into a arrayCompare both lists for exact match and copy their IDs into a arrayCreating a temporary HTML table with items selected based on the ID from part 2 's arrayCreating a temporary HTML table with items selected based on the ID from part 2 's array


@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

Hey @Brad_Groux

 

I am trying to do something similar to this. 

As I have it set up now I am pulling records from Salesforce and creating an HTML table from this. 

My problem is that in my Salesforce record I only get the users ID and not the name. So I have created a 'apply to each' to loop through the records and get the user name based on the information I have. 

 

So what I am trying to do now is to take the data from the 'apply to each' and add a new row to a blank HTML table. 

Or do something similar to what you said in this post and save all of this data somewhere else and then make the table at the end pulling from the list where we created the data. 

 

Could you give me any insight on how to do this ? Any help is appreciated!

Let me know if you need any pictures or any more explanation! 

Thank you!

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (1,877)