Hi,
I have not had much luck locating the answer to this.
I would like to use the sharepoint get items action within flow however i would like to filter the query to include only items created in the last 3 days in order to reduce the amount of time it takes to run each of the subsequent actions for each item retrieved.
I presume I need to enter the query into the filter query section but I cannot seem to get it right. Any help would be much appreciated.
Solved! Go to Solution.
Hi @Jimbo1,
To use Filter query to get items created in the last three days, you could try to use the following code in your flow.
Created ge addDays(utcNow('yyyy-MM-dd'),-3,'yyyy-MM-dd')
The adddays function will subtract 3 days within utcnow.
Note: Please add a single quote around the adddays function. Please check the following screenshot.
Check the following docs for more details about the function:
Using Filter Expressions in OData URIs
Workflow Definition Language functions reference for Azure Logic Apps
Best regards,
Mabel Mao
Hi @Jimbo1,
To use Filter query to get items created in the last three days, you could try to use the following code in your flow.
Created ge addDays(utcNow('yyyy-MM-dd'),-3,'yyyy-MM-dd')
The adddays function will subtract 3 days within utcnow.
Note: Please add a single quote around the adddays function. Please check the following screenshot.
Check the following docs for more details about the function:
Using Filter Expressions in OData URIs
Workflow Definition Language functions reference for Azure Logic Apps
Best regards,
Mabel Mao
Thanks Mabel works great.
I was trying to use dateadd but couldnt get it to work.
I have a requirement to use the Start Time of a calendar (SharePoint List). How do you check if the Start Time of a calendar event is equal to today's date. I tried using the internal name for Start Time (EventDate) along with Start Time and I continue to get query is invalid.
I got the same issue here. I want to utilize both start time and end time which are called "EventDate" and "EndDate" respectively, but still getting the 400 error code.
@v-yamao-msft Hi Mabel Mao,
The issue: Sharepoint "Created" date is different from my timezone,
So when i run the flow -> some items were excluded
I cannot get this to work. I received the error mesasage:
{
"status": 400,
"message": "The query is not valid.\r\nclientRequestId: bc799bb6-fd2d-4bbb-933c-aaf4aeb7b816\r\nserviceRequestId: 434cd79e-6077-8000-4577-1a32b2059a94"
}
I tried your suggestion to the letter.
Anyu advice please?
Hi @johnhadler .
You may get a quicker and more accurate response by starting a new thread at Get Help with Microsoft Flow and referencing this thread then providing full detail of your Flow and any issues.
If you have found my post helpful, please mark thumbs up.
Any other questions, just ask.
Thanks, Alan
Proud to be a Flownaut!
Make sure you are registered #MSBizAppsSummit #CommunityRocks
Check out new user group experience and if you are a leader please create your group
User | Count |
---|---|
24 | |
14 | |
12 | |
7 | |
6 |
User | Count |
---|---|
46 | |
22 | |
17 | |
15 | |
10 |