Orderby on SharePoint list item does not work

三世轮回 提交于 2019-12-20 05:16:13

问题


I'm trying to order a collection of list items with Microsoft Graph :

.../items?select=id&orderby=id%20desc

I've tried on multiple properties and with a space instead of %20. I've followed the documentation.

But ids are always ordered ascending. Am I doing anything wrong or is it a bug with Microsoft Graph ?


回答1:


The $orderby parameter is not currently supported by the SharePoint endpoints. At this time only $select, $expand, and $filter are supported.

I recommend visiting the UserVoice and adding a request for this feature. It seems like it would be valuable when pulling a collection of ListItem resources.


As an aside, you're also missing the $ prefix:

items?$select=id&$orderby=id desc

Ignoring the $ prefix is only supported on the beta endpoint. Per the documentation:

Note: On the beta endpoint, the $ prefix is optional.



来源:https://stackoverflow.com/questions/47475991/orderby-on-sharepoint-list-item-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!