Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Process Mining
Unanswered

Filter OData query with not contains

(0) ShareShare
ReportReport
Posted on by

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

     

     

     

  • RobElliott Profile Picture
    10,138 Super User 2025 Season 1 on at
    Re: Filter OData query with not contains

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

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