cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dflemming
Helper I
Helper I

Get Items on sharepoint list where Modified is Today

Hello, having difficulty getting today's modified items. My odata filter looks like this

 

modified error.png

 

 

 

The format of utcNow is yyyy-MM-dd but when I use eq or ge no results are returned. 'Less than' works and returns everything in the list that is 'Approved'. Could anyone suggest an easier way  to do this?

 

Kind regards, Dale

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jay-Encodian
Community Champion
Community Champion

Hey @dflemming 

Try this expression: startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')

Full filter query: Status eq 'Approved' and Created gt 'startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')'

HTH

Jay

View solution in original post

Thanks Jay, I ran the date check alone and found some results. Then added the Approved condition after the date check and it worked. Thanks for the troubleshooting tip and the StartofDay() function. I know the order shouldn't affect it but I'm glad it working.

View solution in original post

4 REPLIES 4
Jay-Encodian
Community Champion
Community Champion

Hey @dflemming 

Try this expression: startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')

Full filter query: Status eq 'Approved' and Created gt 'startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')'

HTH

Jay

View solution in original post

Many thanks, I've made the change however my result is still empty. I've pasted my filter in below.

 

Status eq 'Approved' and Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

 

When I check the list there are definitely items created today.

 

Regards, Dale

Hey @dflemming 

I have just setup this list to test the query:

5.jpg

 SharePoint action configured as follows:

Filter query: Status eq 'Approved' and Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

6.jpg

 And the data returned is correct:

7.jpg

 

The JSON:

8.jpg

 

Can you please verify your query by breaking it down, i.e. just filter on status, and then just filter on the Created field... if there is an issue with status you need to verify the internal field name via list settings.

HTH

Jay

 

Thanks Jay, I ran the date check alone and found some results. Then added the Approved condition after the date check and it worked. Thanks for the troubleshooting tip and the StartofDay() function. I know the order shouldn't affect it but I'm glad it working.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,380)