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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Filter query for library

(0) ShareShare
ReportReport
Posted on by 1,934 Moderator

I'm working on a Flow that will go through all the files in a SharePoint library and filter out those that have a date "Review_notice" that is less than or equal to today.

The first item in Filter Query is

formatDateTime(item('getFilesProps')?['Review_notice'])

The second is

formatDateTime(body('Convert_time_zone'))

annetoal_0-1615254786986.png

Trying to use the Filter Query but running into this error

Unable to process template language expressions in action 'getFilesProps' inputs at line '1' and column '15996': 'The template language function 'item' must not have any parameters.'.

 

The overview of the Flow is this:

annetoal_1-1615255002063.png

In the Apply to each, it sends an email to the owner of each file that passed the filter in the getFilesProps step.

Please help, how do I make this Filter query work?

Thanks,

Anne

 

 

I have the same question (0)
  • Verified answer
    v-duann-msft Profile Picture
    on at
    Re: Filter query for library

    Hi @annetoal 

     

    Thank you for posting.

     

    According to your description, you couldn’t get correct files while configuring filter query to filter date property. If any misunderstood, please kindly let me know.

     

    As we known, there are multiple limitations of ‘filter query’ function, I recommend you use ‘filter array’ action to complete filtering operation.

    v-duann-msft_0-1615270803578.png

     

    The expression should look like as below:

    formatdatetime(items('Apply_to_each')?['Review_notice'],'yyyy-MM-dd')

    formatDateTime(utcNow(),'yyyy-MM-dd')

     

    Hope the content above may help you.

     

    Thanks

    Anna

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard