Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

In my sharepointSharePoint site, I have another sub-sitesubsite. On the top level site, there is a list to store 'document type'. Within the sub-sitesubsite, I have a document library which looksuplookup the 'document type' list.

I need to get the lookup field values for the document library item which I query through REST API. The lookup field is 'Az_DocumentType'

Initially I got the document type id using the below sample:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentTypeId

However when I use the below code to get the value of the field using 'expand' I get the below error.

Rest call:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentType/Id&$expand=Az_DocumentType/Id

Error in Postman window:

The field 'Az_DocumentType' is not supported in the query. The lookup list is in another web.

Is there a way to get lookup field values as this in one go?

In my sharepoint site I have another sub-site. On the top level site there is a list to store 'document type'. Within the sub-site I have a document library which looksup the 'document type' list.

I need to get the lookup field values for the document library item which I query through REST API. The lookup field is 'Az_DocumentType'

Initially I got the document type id using the below sample:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentTypeId

However when I use the below code to get the value of the field using 'expand' I get the below error.

Rest call:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentType/Id&$expand=Az_DocumentType/Id

Error in Postman window:

The field 'Az_DocumentType' is not supported in query. The lookup list is in another web.

Is there a way to get lookup field values as this in one go?

In my SharePoint site, I have another subsite. On the top level site, there is a list to store 'document type'. Within the subsite, I have a document library which lookup the 'document type' list.

I need to get the lookup field values for the document library item which I query through REST API. The lookup field is 'Az_DocumentType'

Initially I got the document type id using the below sample:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentTypeId

However when I use the below code to get the value of the field using 'expand' I get the below error.

Rest call:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentType/Id&$expand=Az_DocumentType/Id

Error in Postman window:

The field 'Az_DocumentType' is not supported in the query. The lookup list is in another web.

Is there a way to get lookup field values as this in one go?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link
Shaamil
  • 708
  • 1
  • 10
  • 25

Retrieve lookup field value using REST API

In my sharepoint site I have another sub-site. On the top level site there is a list to store 'document type'. Within the sub-site I have a document library which looksup the 'document type' list.

I need to get the lookup field values for the document library item which I query through REST API. The lookup field is 'Az_DocumentType'

Initially I got the document type id using the below sample:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentTypeId

However when I use the below code to get the value of the field using 'expand' I get the below error.

Rest call:

http://MY_SUB_SITE/_api/web/lists/getByTitle('Document Library')/items(3)?$select=Az_DocumentType/Id&$expand=Az_DocumentType/Id

Error in Postman window:

The field 'Az_DocumentType' is not supported in query. The lookup list is in another web.

Is there a way to get lookup field values as this in one go?