0

I have two SharePoint lists. 1) Posts and 2) Categories

The Posts list has a lookup field called Category into the Categories list.

I am trying to use the $expand option to join the two lists but I'm unsuccessful.

I'm trying to follow the example used in this site but I'm confused.

Any ideas?

I've tried the following and many other combinations but I get errors

http://[...]/_api/web/lists/getbytitle('Posts')/Items?$select=Title,PostsCategoryId/Id&$expand=PostsCategoryId
0

Since you're using the blog site definition, the Posts list has the category field defined as PostCategory

Try:

blog/_api/web/lists/getByTitle('Posts')/Items?$select=Title,PostCategory/Title&$expand=PostCategory

Make sure you're using the sub-site _api endpoint if you're not at your site root

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.