Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

converting sharepoint document library lookup column output to value only

Hey all,


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.


Annotation 2020-06-24 140516.jpg


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. 


Annotation 2020-06-24 140225.jpg

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:


Title 1


Product 2

Product 3

Crop 1
Title 2

Product 1

Product 2

Crop 1

Crop 2

Crop 3


I'm trying to accomplish something very similar to this:


Thanks for any help!!

Super User
Super User

Hi @Sephiel 


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.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up

Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Community Support
Community Support


Hi @Sephiel ,


If so, using Select action cannot achieve your needs.

You can consider the following configuration:



Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.


Annotation 2020-07-01 143020-2.jpg

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!

Annotation 2020-07-01 145104.jpg

@abm @v-bacao-msft 


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.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @v-bacao-msft,


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:

I've tried to use Compose to replace the styling via this tutorial: 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?

Helpful resources

October Events

Mark Your Calendars

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



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 (3,801)