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