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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Syntax for ODATA filte...
Power Automate
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard