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 query for library
Power Automate
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

 

 

Categories:
  • Verified answer
    v-duann-msft Profile Picture
    Microsoft Employee on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard