Skip to main content
Community site session details

Community site session details

Session Id : CCA5F4Uf6Sdy6mW6nRWfS0
Power Automate - Process Mining
Answered

Filter OData query with not contains

Like (0) ShareShare
ReportReport
Posted on 21 May 2021 10:07:33 by

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:
  • mvn Profile Picture
    32 on 22 Feb 2024 at 14:34:31
    Re: Filter OData query with not contains

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

     

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

     

     

     

  • papsoc Profile Picture
    4 on 07 Dec 2023 at 15:54:24
    Re: Filter OData query with not contains

    That should make the trick:

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

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

  • Community Power Platform Member Profile Picture
    on 02 Dec 2022 at 20:54:09
    Re: Filter OData query with not contains

    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 

  • Verified answer
    Community Power Platform Member Profile Picture
    on 24 May 2021 at 06:20:47
    Re: Filter OData query with not contains

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

  • mahoneypat Profile Picture
    1,720 on 22 May 2021 at 02:04:47
    Re: Filter OData query with not contains

    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

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete