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 / Issue with odata filte...
Power Automate
Unanswered

Issue with odata filter - Get Items

(0) ShareShare
ReportReport
Posted on by

Hello,

I have created a flow that fetches record from SharePoint list and sends a weekly report.

 

I need to fetch all the records of last 7 days but it is fetching only record of 1 day.

Vijayashri1_0-1647552214055.png

 

Created - date and time field (Ex : 2022-03-10T12:58:51Z ).

Can someone help me with the condition @ filter query 

 

Thank you. 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    You can try the following expression and filter query:

    addDays(utcNow('yyyy-MM-dd'), -7)

    For example, in the following filter query I am searching for items that were created on or after 2022-03-10T00:00:00  which is 7 days ago from 2022-03-17:

    Snag_7f59d55.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    on at

    Hi ekarim,

    Thanks for the response. I did try above condition but It is fetching only record that were created on 10-03-2023. 

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Please share the filter query and the expressions for the data calculation.

     

    Ellis

  • Community Power Platform Member Profile Picture
    on at

    Vijayashri1_0-1647562262309.png

     

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    You can add the following compose action after Get Items to count how many items are returned:

    Snag_da0cafb.png

    length(outputs('Get_items')?['body/value'])

    Please show the runtime output of the compose action once you have run the flow.

     

    And please also check the SharePoint list to confirm how many item there are with a created date greater or equal to: addDays(utcNow('yyyy-MM-dd'), -7)

     

    Ellis

  • Community Power Platform Member Profile Picture
    on at

    There are 690 records in the SharePoint list which were created between 10/03/23 to 17/03/23. But it is fetching only 100 records.

    Vijayashri1_0-1647565100872.png

     

    I did increase the default limit for get items and the flow is working as expected. Thanks for the help @ekarim2020 

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard