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 / Syntax for ODATA filte...
Power Automate
Answered

Syntax for ODATA filter substringof to not contain certain text

(0) ShareShare
ReportReport
Posted on by 13

I'd like to use an ODATA filter to exclude records that contain certain words in their title.

 

I can see that 'substringof' can be used to include records that contain certain words. So this will filter records that contain certain text: substringof('text to check for',Title)

 

What would the syntax be if I want to exclude all records that contain that text?

I've tried a few different things using 'ne' but with no success.

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @WSR2006,

     

    It seems like there is no "not contains" in the ODATA syntax:

    https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

    As a workaround, you could use the Filter query under the Get items action:

    Annotation 2020-07-06 172326.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • WSR2006 Profile Picture
    13 on at

    Thanks - yes that works as a workaround.  Would be good still if they can add a 'not contains' function to the ODATA syntax though.

  • TheBrittinator Profile Picture
    16 on at

    I had a similar issue and I wanted to share an alternative solution using the ODATA filter query that worked for me. 

     

    I use a sharepoint list with Power BI, so my list cannot be empty. My workaround was to leave a 'DO NOT DELETE' list item as a quick fix. That means I needed to adjust my scheduled flow to delete everything EXCEPT that item. In the ODATA Filter Query I typed the following:

     

    Status eq 'New'

     

    For your use case it would be:

     

    ColumnName eq 'Value' (this is case sensitive)

     

    And now my scheduled flow will only age off items that are of the status New. I changed the status of my DONOTDELETE item to 'By design' and now it will not be deleted.

    odata filter query.PNG

     

  • 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)

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard