1

I have an odd issue today. When looking at a list I can see the lookup field is populated with an item, this is one of a few lookup fields on the list. However when I look at the results of a rest call to the list none of the IDs of the item show up, the collection in the JSON is empty and self closing.

//Lookup field Populated in list lookup field showing item in list

//lookup field showing that it has no items in REST Lookup field showing no REST entry

//Another lookup field in same list presenting correctly Another lookup field in same list presenting correctly

I had resolved this before by deleting and re-creating the column, however the issue returned the next day.

Has anyone ran into this issue before and know how to fix it?

Edit: this was the query used to get all the list data back. https://<>.sharepoint.com/teams/AIR/_api/web/lists/getbytitle('AIR%20Incidents')/items(238)

Edit: Was suggested to use a select and expand to fix issue but did not resolve problem. I have added more info related to this below.

//result of resquested query (modified slightly to show information from list)

https://<>.sharepoint.com/teams/AIR/_api/web/lists/getbytitle('AIR%20Incidents')/items(238)?$select=basicSpecificLocation,peoplePerson/ID&$expand=peoplePerson

Lookup not returning ID

//Column Settings list column settings

//Internal Field Name Internal Field Name

//List Showing Lookup Exists and has values List showing lookup exists and has value

Any further help you can provide will be appriciated.

2
  • Can you post the rest url you are using to fetch the list items? Commented Dec 11, 2018 at 14:34
  • Hi, edited question with URL, it was just a simple "get back everything" Commented Dec 11, 2018 at 15:01

2 Answers 2

0

Try using below URL:

https://<>.sharepoint.com/teams/AIR/_api/web/lists/getbytitle('AIR%20Incidents')/items(238)?$select=Title,peoplePerson/ID&$expand=peoplePerson 
1
  • Hi Ganesh, Thanks for your help, however this solution did not work for me, I have ammeded my question with notes of how this went. Commented Dec 12, 2018 at 9:20
0

Thanks for your help.

I resolved it myself, it turned out that a lookup field wont return any Id in rest if the lookup field (i.e field/Title) is empty.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.