本文介绍了我们可以使用rest API在线查询sharepoint中的多级查找列吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有3个SharePoint列表:



PersonList:1)标题2)AddressLookupColumn



AddressList :1)标题2)AddressTypeLookupColumn



AddressTypeList:1)标题



我需要的是名称使用OData Rest API的人员,地址和地址类型。以下是我的查询无效...



https:// mysitecollection / sites / test / _api / web / lists / getbytitle('PersonList')/ items?$ select = Title,AddressLookupColumn / Title,AddressLookupColumn / AddressTypeLookupColumn / Title& $ Expand = AddressLookupColumn,AddressLookupColumn / AddressTypeLookupColumn



它给出了以下错误:



-1,Microsoft.SharePoint.SPException对'AddressLookupColumn / AddressTypeLookupColumn'字段的查询无效。



我有什么不对吗?如果有人有想法,请告诉我。在此先感谢...



我尝试过的事情:



我有尝试下面的休息api电话。



https:// mysitecollection / sites / test / _api / web / lists / getbytitle('PersonList')/ items?$ select =标题,AddressLookupColumn / Title,AddressLookupColumn / AddressTypeLookupColumn / Title& $ Expand = AddressLookupColumn,AddressLookupColumn / AddressTypeLookupColumn

解决方案



There are 3 SharePoint Lists:

PersonList : 1) Title 2) AddressLookupColumn

AddressList : 1) Title 2) AddressTypeLookupColumn

AddressTypeList : 1) Title

What I need is the Name of Person, Address, and Address Type using OData Rest API. Below is my query which is not working...

https://mysitecollection/sites/test/_api/web/lists/getbytitle('PersonList')/items?$select=Title,AddressLookupColumn/Title,AddressLookupColumn/AddressTypeLookupColumn/Title&$Expand=AddressLookupColumn,AddressLookupColumn/AddressTypeLookupColumn

It gives me below error:

-1, Microsoft.SharePoint.SPException The query to field 'AddressLookupColumn/AddressTypeLookupColumn' is not valid.

Am I doing any mistake? Please let me know if anyone have idea. Thanks in advance…

What I have tried:

I have tried below rest api call.

https://mysitecollection/sites/test/_api/web/lists/getbytitle('PersonList')/items?$select=Title,AddressLookupColumn/Title,AddressLookupColumn/AddressTypeLookupColumn/Title&$Expand=AddressLookupColumn,AddressLookupColumn/AddressTypeLookupColumn

解决方案




这篇关于我们可以使用rest API在线查询sharepoint中的多级查找列吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-09 02:00