Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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".

So far it looks like this:

items?$select=ID,Title,LookupColumn1/Title&$expand=LookupColumn1

This works - It returns that value of the Title column in List A.

I also have another list, "List B", with a Title column I would like to reference.

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.

Thanks for any help.

Jared

like image 531
Jared Whittington Avatar asked Oct 11 '13 04:10

Jared Whittington


1 Answers

I worked it out! For those who wish to know you must specify the expansion column on both sides of the $expand method. Eg:

items?$select=ID,Title,LookupColumn1/Title,LookupColumn2/Title&$expand=LookupColumn1/Title,LookupColumn2/Title

like image 63
Jared Whittington Avatar answered Nov 15 '22 07:11

Jared Whittington