cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Get items Filter Query 'Created'

Hi,

 

I am atempting to use the Filter Query on the SharePoint 'Get items' step. What I woudl like to do is return only the items that were created on that day. I am using the SharePoint 'Created' coulum and the folowing expresion to retun, what I think is the proper format for the created:

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

Below is the 'Get items' step:Get Items.png

 

 

This is the error that I am getting:BadRequest.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to filter items which are created in current day using the OData Query within the Filter Query field of the "Get items" action?

 

I think there is something wrong with the formula that you provided within the Filter Query field of the "Get items" action of your flow. I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name. Within Filter Query field, type the following formula:
Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

1.JPGThe startOfDay(...) expression read as below:

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

Note: The startOfDay(...) expression is wrapped with single quotes.

 

Image reference:2.JPG

The flow works successfully as below:3.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to filter items which are created in current day using the OData Query within the Filter Query field of the "Get items" action?

 

I think there is something wrong with the formula that you provided within the Filter Query field of the "Get items" action of your flow. I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name. Within Filter Query field, type the following formula:
Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'

1.JPGThe startOfDay(...) expression read as below:

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

Note: The startOfDay(...) expression is wrapped with single quotes.

 

Image reference:2.JPG

The flow works successfully as below:3.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

@v-xida-msft

Thanks for the reply! I think where I was going wrong was I was just using the expression builder and not putting the quotes around the expression. When I typed the expression directly into the Filter Query box, it worked as expected. 

where does the output get stored. 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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,076)