Hail REST API Guru. I’m having trouble bringing back data from a lookup field. I have a field pointing to a MeetingDate list for a field called StatusedDate
I’ve tried ever combination of API but I can get the field StatusedDateId but not the StatusedDate.
I can see the StatusedDateId in the source but can’t quite get the expand command to work.
Here are some combinations I’ve tried:
/_api/web/lists/getbytitle(‘Facility%20Status%20List’)/items?$select=StatusedDateId/StatusedDate&$expand=StatusedDateId/StatusedDate
/_api/web/lists/getbytitle(‘Facility%20Status%20List’)/items?$select=StatusedDateId/StatusedDate&$expand=StatusedDateId, StatusedDateId/StatusedDate
/_api/web/lists/getbytitle(‘Facility%20Status%20List’)/items?$select=StatusedDateId,StatusedDateId/StatusedDate&$expand=StatusedDateId
Hi there Looks like you are trying to pull StatusedDateId which, internally is the ID field of the lookup column. You want to try and pull the field name followed by the properties you want.
For example. Lets say your lookup is called ‘StatusedDate’. And it has two fields on it, Id and ‘StatusedDate’ (these are the names of the two columns on that list).
Your query would be as follows…
/_api/web/lists/getbytitle(‘FacilityStatusList’)/items?$select=StatusedDate/Id,StatusedDate/StatusedDate&$expand=StatusedDate
Notice the lack of ‘id’ (unless your lookup field is actually called ‘StatusDateId’