Query to filter SharePoint List Items by Lookup Fields in Microsoft Flow (Power Automate)

Posted by

In one of the recent projects, I needed to apply a filter on a lookup field in a document library.

Here is what I was trying to achieve.

I have a list of Technologies.

I have a library of Templates.

When I create a Project in the “Projects” list, I want Power Automate to create a folder in the SoW folder with the project name and add the template of the corresponding technology in the folder.

Note, that “Technology” is a lookup column in the “Documents” library and “Projects” list.

Essentially what I trying to do is to form the query:

Get me the file from the Documents library where Technology matches the Technology in the Project List

I started by adding the Get Files action with an Odata filter. It didn’t work.

I then realized that the field in the left hand side is actually an object and I was equating it to a string value.

How to solve this?

After doing some research I found the syntax to use for lookup column. Here is what worked!

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *