I'm working on a Flow to generate a weekly email that lists new files uploaded to a SharePoint document library in the past week. I was able to get an email output with the proper information using a Filter Query (thanks @ScottShearer!), send it to a select filter, output to an HTML table and so on.
The trouble I'm running into is that the "All Products" and "Crop" columns are multi-select lookup columns, so the output contains much more object information that I'd like to filter out. I have seen an example to use a Compose step and include ?['Value'] in the expression, but I get the error that it needs to be an integer.
So here, my target output is a table listing just "Fertilizer", "Product 2", etc. Doesn't much matter if they are in separate lines or separated by commas. The table output I'm going for is:
I'm trying to accomplish something very similar to this:
Thanks for any help!!
You won't be able to convert into HTML using the select filter because you have multiple product values in an array. You need to iterate the products in another loop. Then once you have all the information you may need to try using the HTML tags (using <tr> <td> tags) to construct using append strings or an array to build the report you need.
Thanks! That method is giving me the intended results as long as I set each string variable to null at the end of the highest "Apply to Each" loop.
Now the only challenge I am running into is where exactly using HTML tags will work to get the multi-level results onto separate lines - if I include them in the "append to string variable" steps (just adding <br> to the end of the expression,) it logically does read it as part of the string and not as an HTML tag. Is there a way that I can change the array to read the HTML tags as I'm hoping? Thanks!
Hi @Sephiel ,
You can try to add a new line in the Value of Append to string variable.
After you configure Dynamic content in Value, click "Enter" to add a new line.
I am just stuck scratching my head here. I'd seen other examples of putting a new line in the inputs for the variables, but in my case it only adds a space instead of a new line.
But it seems that's the least of my concerns - I cannot get any email output that changes the table layout from my Create HTML Table step. I have tried adding the CSS table styling to the body of the email message. I've tried including it in a Compose step as in this tutorial: https://ryanmaclean365.com/2020/01/29/power-automate-html-table-styling/.
I've tried to use Compose to replace the styling via this tutorial: https://www.sharepointsiren.com/2019/07/formatting-html-tables-in-flow/. I've tried different versions of the email client and nothing touches the look of the table. I have a similar flow using the output of an HTML table and the V2 email client and the table is formatted exactly as intended. I feel like I'm doing the exact same thing, but this time the table will not change formatting no matter what I try. Any ideas?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.