Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Process Mining
Answered

Filter OData query with not contains

(0) ShareShare
ReportReport
Posted on 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 at
    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 at
    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 at
    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 at
    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 at
    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

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Process Mining

Overall leaderboard