web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter OData query wit...
Power Automate
Answered

Filter OData query with not contains

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I would like to filter my 'Get Items' function with a "Does not contain" type of filter but I am unsure of the syntax. Can somebody please assist me with the correct syntax?

Categories:
I have the same question (0)
  • mahoneypat Profile Picture
    1,720 on at

    You can use substringof in the Filter Query of your Get Items action, but it looks like you can't do the "not" version of that.  This post shows another way to do it.

    Solved: Syntax for ODATA filter substringof to not contain... - Power Platform Community (microsoft.com)

     

    Pat

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Solved this one by using the filter array action after the get items function

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Apparently, it is now possible to do not()-notation (know from workflow definition language, you do expressions in) to reverse a contains statement:

    TokeJacobsen_0-1670014437722.png

     

     

    @mahoneypat 

  • papsoc Profile Picture
    4 on at

    That should make the trick:

    It will bring all records, excluding the ones having abcdefg in their Fieldname.

    ?$filter=not substringof('abcdefg', Fieldname)

  • mvn Profile Picture
    32 on at

    not contains doesn't work with odata filter query but can use 'not' like this:

     

    $filter=not(startswith(fieldName,'text to search'))

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard