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 / OData filter combining...
Power Automate
Unanswered

OData filter combining multiple or statements with and

(0) ShareShare
ReportReport
Posted on by 2,307 Super User 2025 Season 2
Hello,

I need to filter a SharePoint Get files (properties only) action to return items that match either one of several content types with a Created gt 'addDays(utcNow(),-7)' filter to get a list of documents that have been created in the past week and match one of a few content types.

My filter goes something like...

Created gt 'addDays(utcNow(),-7)' and ContentType eq 'Invoice' or ContentType eq 'Remittance'

What I get is every remittance on the whole document library created any time and every invoice created in the past 7 days.

How can I bracket these statements? I can move the Created gt filter out to a condition but then when I perform an action on the result (build an html table) I get an automatic for each. The whole filter needs to be in the initial get files action so I can build a single html table that matches my filter.

Is this possible? If not, is there a workaround?
Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @WillPage,

     

    Instead of using a Condition, please try to use the action Filter array. Then in the action Create HTML table, it would be able to select value from the filtered items.

    Please check the following image for a reference:

     1.PNG

     

    Best regards,

    Mabel

  • Verified answer
    WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    Hi Mabel,

     

    I got around this by bracketing the statements:

     

    Created gt 'addDays(utcNow(), -7)' and (ContentType eq 'Invoice' or ContentType eq 'Remittance')

     

    I don't know why I didn't try that before posting here, but thanks anyway; I have another use for the Filter array action so I still learned something from you!

  • v-yamao-msft Profile Picture
    on at

    Hi @WillPage,

     

    Thanks for sharing and updating.

    I am very glad that you have figured it out and it is working for you now.

     

    Best regards,

    Mabel

  • rschneider Profile Picture
    75 on at

    Hi @v-yamao-msft ,

    Why should I use a filter instead of the query? My thoughts behind using the filter: Make SharePoint connector do heavy lifting of sifting through thousands of items and have flow work with much smaller subset later. Hoping this improves performance. Is this the case? Or would it actually be much faster the other way around?

    Assumptions: ca. 100000 items in SP List, need to select only max. 10.

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