Try following. I am assuming that you have included
Title column in your lookup column.
Building a clause for
Active="Yes", you have to use
http://<siteurl>/_api/lists/getbytitle('Project%20Locations')/items?$select=Title,ProjectName/Title&$expand=ProjectName&$filter=Active eq 1 and ProjectName/Title eq 'X'
Meaning of the error.
You have to
$expand your lookup columns. Target column must be specified in the
$filter by lookup column
- You need to
$expand that column
$select, you have to specify which columns you need to retrieve from lookup column. For example, your lookup list has several columns like
CloseDate and others. Now you need
Name. So your query string is
- Now you can
ProjectName/Name="Y". Remember you can not $filter something directly like
ProjectName="X". So your $filter should look like
$filter=Active eq true and ProjectName/Title eq 'X'
Let me know for more explanation OR have a look on my article
CRUD Operation to List Using SharePoint 2013 Rest API