Is is it possible to run a flow to create html tables that have merged rows if consecutive rows have the same value?
I've successfully created a html table with conditional formatting using the flow below.
Details of the above flow:
Hi,
Big Question: If the lists do NOT have any duplicates, do you want to still merge them and create an HTML Table? My example will send emails regardless of if the Merge did or did NOT have duplicates.
You want to merge lists sets of data together, removing the duplicates and then you want to create an HTML table with the result?
My Assumptions here are that you will add another Get Items to get the other list (as i only see one) in your flow.
I am also going to assume, that if the two lists have NO duplicates, that you still want to merge and create a table.
Example: How you get rid of the duplicates:
And then I have my Compose, which does a Union using both variables (AKA Arrays, Array1 & Array2)
union(variables('Array1'),variables('Array2'))
When it runs you can see I have no duplicates
[
{
"user": "Betty",
"deviceid": "AC-219",
"device": "Computer"
},
{
"user": "Betty",
"deviceid": "AC-210",
"device": "phone"
},
{
"user": "Steve",
"deviceid": "AC-219",
"device": "Tablet"
},
{
"user": "Dave",
"deviceid": "AC-210",
"device": "phone"
}
]
So for you after you run both Get Items, you would use union to merge them and remove the duplicates. The Arrays for YOU are the Dynamic property "value" from each Get Items. Assuming you didn't rename the action, you would have Get items and Get items 2
So you would type
union(insert dynamic property value from Get items, insert dynamic property value from Get Items 2)
Now to create the Table which is much easier steps
-After the Compose for the Union
-Add a Create HTML Table
-In the From set it to outputs('Name of Your Compose')
-which is the name of my Compose that did the union.
-The result will be NO duplicates and a nice table
here is my entire flow
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
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