cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Oskarkuus
Level: Powered On

Sharepoint Get Items Query Filter - How to filter on specific dates?

How do i filter a sharepoint get items flow on a specific date?

 

I have tried this:

Created ge 'startofday(adddays(utcnow(),-2))'

Created ge 'adddays(utcnow(),-2))'

Created ge 'utcnow(),-2))'

 

i have hoped to get only the posts that was created two days ago.

 

 

 

but the flow fails giving this error message on both.

{
"error": {
"code": 502,
"source": "flow-apim-europe-001-francecentral-01.azure-apim.net",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.\r\nclientRequestId: 09c44984-6428-4cdf-89cc-6e8945ada4b2\r\nserviceRequestId: 09c44984-6428-4cdf-89cc-6e8945ada4b2"
}
}
}
 
1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Sharepoint Get Items Query Filter - How to filter on specific dates?

@Oskarkuus 

 

Now you are sneaking in more questions 🙂

 

substringof(Orsak,'Kafeterian') and Created ge 'startofday(adddays(utcnow(),-2))'

 

where bold is expression

 

Regards,

Reza Dorrani

 

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
Dual Super User
Dual Super User

Re: Sharepoint Get Items Query Filter - How to filter on specific dates?

Hi @Oskarkuus 

 

This worked for me 

 

Make sure you are adding the expression using the expression editor

 

Capture.PNG

Oskarkuus
Level: Powered On

Re: Sharepoint Get Items Query Filter - How to filter on specific dates?

Got it to work.

I had a few ' ' to many in the expression that messed things up.

 

So how would one go about adding an second statement to this?

 

"Get all rows from datasource from two days ago that have the word "Kafeterian" in column Orsak"?

 

I would want to filter on two things now.

 

Then after that do a sum on all those results based on a third column.

Dual Super User
Dual Super User

Re: Sharepoint Get Items Query Filter - How to filter on specific dates?

@Oskarkuus 

 

Now you are sneaking in more questions 🙂

 

substringof(Orsak,'Kafeterian') and Created ge 'startofday(adddays(utcnow(),-2))'

 

where bold is expression

 

Regards,

Reza Dorrani

 

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

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,175)