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:
This is the error that I am getting:
I am getting the below error when i try the command
The expression "Created eq 2024-02-10T00:00:00Z" is not valid. Creating query failed.
where does the output get stored.
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.
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:
Created gt '@{startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')}'
The startOfDay(...) expression read as below:
startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ssZ')
Note: The startOfDay(...) expression is wrapped with single quotes.
Image reference:
The flow works successfully as below:
More details about using expression in flow actions, please check the following article:
Use expression in flow actions
Best regards,
Kris
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional