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
Unanswered

Filter OData query with not contains

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

Trying to create a filter on my get items to filter out results that don't fit the below criteria. 

 

Entries need to have a ship date (Field9) of yesterday (-1 day)

Entries doesn't contain C-EXV in field 2

 

This is my query so far which isnt working 

 

field_9 eq '@{formatDateTime(addDays(utcNow(),-1), 'dd-MM-yyyy')}' and not(contains(item()?['field2'], 'C-EXV'))
 
The query to filter out all items where the ship date wasnt yesterday works by its self (field_9 eq '@{formatDateTime(addDays(utcNow(),-1), 'dd-MM-yyyy')}') but when i add in the latter part this doesnt work.
 
Any help would be appreciated.  
Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,426 Super User 2026 Season 1 on at

    @hodgson41 you can't use not(contains) in a filter query. Have a look at the blog post by Tom Riha here which shows what you can do instead.

  • 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
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard