Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Filter sharepoint List comparing a field date with today date in ODATA filter

(0) ShareShare
ReportReport
Posted on by 89

Hi all,
I wrote a flow that filters a sharepoint list by comparing a field called DataMemoEmbargo with today's date.
For each record found, it sends an email to an email contact.
I seem to have done everything correctly but the flow does not extract any records.
I tried changing the filter, using another text field, and everything works.
When I use the DataMemoEmbargo field, it does not extract anything.
Attached to this post is the sharepoint record with the date field visible, and the stream I use.
I thank you for any suggestions on this matter
Davide

  • TheGallons Profile Picture
    89 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    Hi,
    thanks for the advice.
    I set 5000 as the value for pagination and now it works. I don't have any performance issues because it is a flow that is automatically scheduled early in the morning to send to users a reminder to unlock their products.
    I thank you so much for the invaluable support and have a good day.
    Thank you
    Davide

  • Verified answer
    creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    @TheGallons If you didn't turn on pagination and set a threshold through the settings of the Get Items action—that action will only return 1000 records by default.

     

    By turning on Pagination, the flow will retrieve your items in batches. The number you set in the threshold would be the number of items retrieved per call.  You will need to adjust this number based on your requirements and how the flow performs. It'll all depend on the amount of data you are receiving, your account limitations etc. 

     

    It may be a better idea to use a smaller threshold and have more calls or a larger threshold. I believe the max threshold is 5000.

    creativeopinion_0-1698447531746.png

     

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

     

  • TheGallons Profile Picture
    89 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    In sharepoint list there are more than 5000 records.

    All records has no value in DataMemoEmbargo

    Just one record has DataMemoEmbargo = 27/10/2023. 

    It is a Date field, without Time. 

    I use that record for test and I change the value and set it to today date before run the flow. 

     

     

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    @TheGallons Can you confirm what value is stored in the DateMemoEmbargo column? Is it just a date? Or does it also store the time?

  • TheGallons Profile Picture
    89 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    Hello,
    thank you for your response.
    I modified the flow by inserting all the suggested sections.
    The strange thing is that the first time it worked, then it didn't work anymore.
    I noticed that the section related to time zone conversion, has one more field than what you suggested in your post.
    The flow gives no errors but it does not select any records for me.
    I give you below the flow and the output it returns.
    I noticed that in the conversion output it returns me a date in an incorrect format (mm/dd/yyyyy) even though I put the correct time zone.

    Is there something I am doing wrong?

     

    Input

    TheGallons_0-1698418152088.png

    Output

    TheGallons_1-1698418212636.png

    TheGallons_3-1698418446501.png

     

    TheGallons_2-1698418406585.png

    In the meantime I look into your youtube channel.

     

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Filter sharepoint List comparing a field date with today date in ODATA filter

    @TheGallons  If you review the Filter Query outputs from the Get Items action, I would imagine that the date isn't outputting what you expect.

     

    In your expression you are using UTC. Depending on when you run this flow, the date will adjust to UTC.

     

    creativeopinion_3-1698254981864.png

     

    Convert Time Zone

    Whenever using dates and times in your flow it's always good practice to use a Convert Time Zone action. 

    creativeopinion_4-1698255151682.png

    creativeopinion_5-1698255188817.png

     

    Count Items Returned

    I would also recommend adding a Compose action after the Get Item action to count the number of items returned.

     

    Use an expression and the length() function with the value outputs from the Get Items action. This can help with troubleshooting and also can be used in a Condition action.

    creativeopinion_1-1698254936390.png

     

    Add a Condition

    Add a Condition to your flow to continue with additional actions if items have been returned.

    creativeopinion_6-1698255267772.png

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492