I am trying to get the data from an additional lookup column with REST API. I have two lists. The main list is "OIE Alerts" and the second list is Countries. The main list has the field "Country" which is a lookup column. It is connected with the field LandName in the Countries list. The additional field is "LandCode". How can I retrieve the additional column with $expand?
1 Answer
Use below endpoint:
/_api/web/lists/getbytitle('listtitle')/items?$select=Title,Country/LandName,Country/LandCode&$expand=LandName
LandCode
column type should not be lookup/user/multi text in Countries.
-
Thanks Praveen, LandCode is a single line textfield. So I don't have to add LandCode in the $expand?– MarcoNov 4, 2017 at 17:43
-