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 Platform Community / Forums / Power Automate / Filter query for library
Power Automate
Unanswered

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:
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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard