Others

How to Fix Power Automate OData Filter Exclude Multiple SharePoint Values Error

John WilsonJohn Wilson Nov 3, 2026 870 views

Question details

The user is experiencing an invalid-query error in Power Automate when trying to exclude multiple SharePoint choice-column values using the substringof function and eq false.

How to Fix Power Automate OData Filter Error When Excluding Multiple SharePoint Values
Product
Power Automate
Device & OS
not provided
Scenario
Filtering items in a Power Automate Get Items action using OData queries to exclude multiple SharePoint choice values.
Observed behavior
The Get Items action returns an invalid-query error when using substringof with comparisons like eq false to exclude several values, though changing OR logic to AND logic helps.
Before you start

Ensure you have the necessary edit permissions for the Power Automate flow and the target SharePoint list before modifying the Get Items OData filter queries.

Solution 1Recommended

Use Explicit Not-Equal Conditions with AND Logic

Replace complex substringof functions with explicit ne (not equal) conditions combined with 'and' logic to properly exclude multiple values without triggering an invalid query error.

The substringof function combined with eq false can cause invalid-query errors in Power Automate, especially when dealing with multiple exclusion criteria in SharePoint choice columns. Using explicit ne (not equal) conditions is a more reliable way to format OData queries for SharePoint.

1
Open the Get Items Action

Navigate to your Power Automate flow in edit mode and click to expand the specific 'Get Items' action that is causing the invalid-query error.

2
Remove the Invalid Substringof Query

Locate the 'Filter Query' field under the advanced options and delete the existing query that relies on substringof and eq false.

3
Build Explicit Exclusion Conditions

Construct a new filter query using the 'ne' operator. For example, to exclude 'ValueA' and 'ValueB' from a column named 'Status', enter: Status ne 'ValueA' and Status ne 'ValueB'.

4
Save and Test the Flow

Click the Save button in the upper right corner of Power Automate, then run a manual test to verify the flow successfully executes and retrieves the correctly filtered SharePoint items.

Use Explicit Not-Equal Conditions with AND Logic
Use AND instead of OR for Exclusions: When excluding multiple values, you must use the 'and' operator. Using 'or' will negate the exclusion because an item only needs to not match one condition to be included in the results.
Free Microsoft Office alternative

Looking for a Lightweight Office Suite to Process Exported SharePoint Data?

While Power Automate manages your complex workflows and data transfers, you often need a reliable office suite to analyze and format the exported SharePoint list data. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office, making it the perfect tool for handling exported Excel reports and documents.

  1. 1. Export SharePoint List Data: Export your filtered SharePoint list data or Power Automate outputs to an Excel (.xlsx) file.
  2. 2. Open in WPS Spreadsheet: Launch WPS Office and open your exported data to quickly view and verify your Power Automate results.
  3. 3. Analyze and Report: Utilize built-in formulas, pivot tables, and professional formatting tools to manage your records effortlessly.
Free and lightweight with low system resource requirementsFully compatible with Microsoft Excel (.xlsx) formats for analyzing exported SharePoint dataFamiliar user interface ensuring a seamless migration and zero learning curveAll-in-one platform integrating Word, Excel, PowerPoint, and PDF editing
microsoft office alternative - wps office

Frequently Asked Questions

Why does the substringof function return an invalid query error in Power Automate?

The substringof function can be unreliable with SharePoint choice columns when passed through Power Automate's Get Items action. When combined with logical negations like 'eq false' and multiple OR conditions, the underlying SharePoint REST API often rejects it. Using explicit equality or inequality checks (eq or ne) is strictly recommended.

Can I use the 'or' operator when excluding multiple items in an OData filter?

No. If you want to exclude multiple specific values simultaneously, you must use the 'and' operator (e.g., Status ne 'Closed' and Status ne 'Cancelled'). If you use 'or', the item will be included if it simply doesn't match one of the conditions, which undermines the exclusion logic.

How do I correctly filter a SharePoint choice column in Power Automate?

To filter a Choice column, you generally need to append '/Value' to the column's internal name in your OData query. For example, if your column is named 'Category', your explicit filter query should be formatted as: Category/Value eq 'SpecificChoice'.