简体   繁体   English

SharePoint 2013 REST语法:如何引用多个查找字段值

[英]SharePoint 2013 REST Syntax: How to Reference Multiple Lookup Field Values

I have a REST call that references the "Title" column from a List we shall call "List A". 我有一个REST调用,它引用了List中的“Title”列,我们称之为“List A”。

So far it looks like this: 到目前为止它看起来像这样:

items?$select=ID,Title,LookupColumn1/Title&$expand=LookupColumn1 项目?$选择= ID,标题,LookupColumn1 /标题&$扩大= LookupColumn1

This works - It returns that value of the Title column in List A. 这有效 - 它返回List A中Title列的值。

I also have another list, "List B", with a Title column I would like to reference. 我还有另一个列表,“List B”,我想引用一个Title列。

How do I expand the second lookup? 如何扩展第二次查找? What is the syntax. 什么是语法。

FYI - I have fiddled around and spent nearly an hour on Google, but most of the articles I have found so far are about expanding lookup columns with multiple values , not multiple lookups. 仅供参考 - 我已经摆弄并在Google上花了将近一个小时,但到目前为止我发现的大部分文章都是关于扩展具有多个值的查找列,而不是多个查找。

Thanks for any help. 谢谢你的帮助。

Jared 贾里德

I worked it out! 我解决了! For those who wish to know you must specify the expansion column on both sides of the $expand method. 对于那些想知道你必须在$ expand方法的两边指定扩展列的人。 Eg: 例如:

items?$select=ID,Title,LookupColumn1/Title,LookupColumn2/Title&$expand=LookupColumn1/Title,LookupColumn2/Title 项目?$选择= ID,标题,LookupColumn1 /标题,LookupColumn2 /标题&$扩大= LookupColumn1 /标题,LookupColumn2 /标题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM