Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Triggers
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
  • Get help with flow
Menu

4 most common problems with Filter Query in Power Automate

Posted on September 13, 2020August 23, 2022 by Tom

“My Filter Query in Power Automate action ‘Get files’ doesn’t filter any data. It returns all documents all the time.”

“The ‘Get items’ filter in Power Automate doesn’t return any items. But I know there are a few in the list”

“Why do I get BadRequest error?”


When your Filter Query in the the Power Automate actions Get items or Get files doesn’t return the data you expect, you might have one of the problems I see very often.

1. Not using column internal name in the query.

Every column in SharePoint has 2 names, internal name (in url format, assigned when the column is created, non-changeable) and display name (the column name you see, can be changed). The most common case of misalignment of internal and display name is when you create a column with spaces in name, e.g. ‘New column’, its default internal name could be ‘Newcolumn’ or ‘New_x0020_column’. So instead of using New column eq 'Something' you have to use Newcolumn eq 'Something' or New_x0020_column eq 'Something‘.

Another case of misalignment happens when you or one of your colleagues rename a column. That’s why the columns have an internal name, otherwise you’d need to change all your solutions every-time you change column name.

How do you find the internal name to use? The easiest way is to go to list settings -> edit column and take it from the url there, it’s the part after ‘Field=’:

2. Syntax of the filter query is not correct.

When using a column in the filter, you use just the internal name as it is. Plain text = SharePoint column internal name.

The value you’re comparing with must be always inside single quotation marks, e.g. column eq 'value'. It is quite common to forget the closing one that will lead to an error.

Also, it’s possible only to compare a column with a ‘value’ in the filter, you can’t do a comparison between two columns like column1 eq column2.

3. Filter based on a column that is not supported.

There’re a few columns that are not supported for the use in the filter, among them are multiple lines of text, lookup and calculated columns.

Additionally to these, there are also some system columns you can’t use, the most famous one being Name of a file in a document library. You can recognize these columns when you try to use them in one of the actions, on hover they’ll be displayed inside { } brackets, as you can see on this example for the document Name:

Hint: you can use FileLeafRef instead of Name (which you can’t use anyway), it contains the file name incl. extension, e.g. to filter only specific document type.

4. Column doesn’t contain the value you expect.

This applies above all when using date columns in the filter. Are you comparing just year/month/date values or does the column also include time?

To confirm what values are evaluated in the filter, you can store the values into variables in a similar way as when validating a condition.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

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

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


NEW! Master the HTTP requests to SharePoint with a new cheat sheet!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Use Power Automate to forward Outlook events upon registrationJanuary 29, 2023
  • Why the condition is false for the same numbers (Power Automate)January 25, 2023
  • How to forward event invitation to other calendar (Power Automate)January 22, 2023
  • Run ‘For selected item’ flow from non-default environment (Power Automate)January 18, 2023
  • Hide button in SharePoint list after Power Automate flow startedJanuary 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes