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

OData error for select a Sharepoint element

I am trying to retrieve all the elements of a Sharepoint list that are not older than a day. Unfortunately, I get a mistake every time I try. I've read many help pages, but everywhere it looks a little different. Once eq stands, then Eq or gt and Qt.
Can someone help me with this specific query and also tell you where there is a good page with examples of how to use OData correctly on Microsoft Flow - by default with SharePoint lists?
Thank you very much for your help.

 

This is my OData Selection:
Created Gt addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),-2)

inspired by:
https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-filtering-with-odata/
I also tried it with lowercase letters.


My alst Error is: (in German)

"message": "Der Ausdruck \"Created Gt addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),-2)\" ist ungültig.\r\nclientRequestId: d3b15755-bba2-476c-98e0-873dd63880e2\r\nserviceRequestId: f9ddbd9e-30dd-0000-6139-a25e4c10a351"
2 REPLIES 2
Super User
Super User

Re: OData error for select a Sharepoint element

@MartinZim:

 

Making the following changes should resolve the issue:

1) Change Gt to gt - needs to be ower case

2) Add single quotes on either side of your expression - see my screen shot below.

OD1.jpg

If this resolves your issue, please mark your post as Solved.

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Community Support Team
Community Support Team

Re: OData error for select a Sharepoint element

Hi @MartinZim,

 

Have your problem been solved refer to @ScottShearer's solution?

 

You could also take a try with expression below:

Created gt '@{addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),-2)}'

Capture.PNG 

 

Best regards,

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 174 members 5,253 guests
Please welcome our newest community members: