在OData查询中使用$ expand [英] Using $expand in OData query

查看:270
本文介绍了在OData查询中使用$ expand的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个共享点列表。主要包含我希望返回的4列。其中一列是查阅列,因此我需要使用$ expand来包含我的回复。

HTTPS://xxxxx/_vti_bin/listdata.svc/KnowledgeBaseFAQs $选择=问题,答案,公共,主题和放大器; $展开;主题/标题


查阅列的来源是一个名为tags的列表,列是标题。

这与主列表中名为Topics的列有关。

So. ... column:Topics = Tags.Title

但它不会回到XML中。我的网址不正确吗?

解决方案

https:// xxxxx / _api / web / lists / getbytitlename('ListNameHere')/ items?


select = Question,Answer,Public,tags / title&


expand = tags


我会尝试使用Rest api ... listdata适用于2010年


以下是参考的博客


https://joemcshea.intellipointsol.com/选择和展开合SharePoint的其余-请求/


I have 2 sharepoint lists. The main one contains 4 of the columns I wish to return. One of these columns is a lookup column so I need to use $expand to include that in my return.
https://xxxxx/_vti_bin/listdata.svc/KnowledgeBaseFAQs?$select=Question,Answer,Public,Topics&$expand=Topics/Title

The source of the lookup column is a list called tags and the column is title.
This relates to the column called Topics in the main list.
So.… column: Topics = Tags.Title
But it is not coming back in the XML. Is my URL incorrect?

解决方案

https://xxxxx/_api/web/lists/getbytitlename('ListNameHere')/items?


select=Question,Answer,Public,tags/title&


expand=tags

I would try to use Rest api...listdata is for 2010

Here is the blog to refere

https://joemcshea.intellipointsol.com/select-and-expand-in-sharepoint-rest-requests/


这篇关于在OData查询中使用$ expand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆