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 / SharePoint - Get Items...
Power Automate
Answered

SharePoint - Get Items - Filter Query

(0) ShareShare
ReportReport
Posted on by

Hello,

I am currently creating a flow, which is supposed to be run upon certain items from the list.

I can help my self with the condition, that does that, but then the flow has to process every single item in the list.

I was wondering if I can help my self using Filter Query in the step of Get items.

 

I have a column containing a date (Due_date) and I need to select only those items, where Due_date is lesser than Today.

So I have tried this: Due_date lt 'utcNow()'

Obviously it does not work, that's why I am here and wondering if it is even possible or if the filter options are limited.

 

Thanks in advance.

Marek

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I believe that I have found the solution

     

    Due_date lt '@{body('Current_time')}' - please note that '@{body('Current_time')}' is generated by including the time object, I am having issues upload the picture for some reason, tried 5 times and gave up.

     

    But, now if I would want to add 1 more condition like, do not include items where Status eq finished, do I just write and in between or something like that?

  • RobElliott Profile Picture
    10,327 Super User 2025 Season 2 on at

    @Anonymous yes you do, just add and then the second part of the filter query.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @Anonymous 

    You'll need to convert the date to the same format as SharePoint stores dates internally.

    Your filter should look like this:

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

    The single quotes are required.  You need to enter formatDateTime() as an expression.

    formatDateTime.jpg

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @ScottShearer and thanks for your help, I have used the Dynamic Content of Current Time for the comparison 🙂

    But thanks for your suggestions, have a great day!

  • RobElliott Profile Picture
    10,327 Super User 2025 Season 2 on at

    @Anonymous the comparison needs to use the US yyyy-MM-dd format, it won't work otherwise. So do try what Scott has said as it is the way to do it.

    Rob
    Los Gallardos

  • Community Power Platform Member Profile Picture
    on at

    @RobElliott - I've tried the flow bunch of time using just the Dynamic Content and it works like a charm.

     

    image.png

  • RobElliott Profile Picture
    10,327 Super User 2025 Season 2 on at

    @Anonymous but you said "So I have tried this: Due_date lt 'utcNow()Obviously it does not work". I've lost track of what you are asking.

    Rob
    Los Gallardos

  • Community Power Platform Member Profile Picture
    on at

    @RobElliott - Sorry for making this thread a mess.

    1) I've asked with the non-functional query you mentioned

    2) Before anyone responded I figured out that I can use the Dynamic Content and wrote a reply that I later marked as a solution

    3) I was still wondering how can I add another parameter to the filter which you have clarified

     

    Shortly, everything is fine now and sorry for the chaos 🙂

    Thanks for your contribution

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard