What is the REST query to obtain all items from a list where the value of two different columns for a given item are different.
Take the query: http://<site_collection>/_api/web/lists/getbytitle(<list_name>)/items?$select=ePR_x0020_NameId,ePurchaseRequestName&$filter=(ePR_x0020_NameId ne ePurchaseRequest)
ePR_x0020_NameId
is a lookup column with the title "ePR Name". How do I properly use the $expand
parameter to get the text of this column rather than the numeric value that is returned?
The query
http://<site_collection>/_api/web/lists/getbytitle(<list_name>)/items?$select=ePR_x0020_NameId,ePurchaseRequestName
returns ePR_x0020_NameId
as numeric value, not the string that is in the lookup column.
So when I try to add a filter parameter to this query to return only items where "ePR Name" and "ePurchaseRequestName" are not equal, I get a "The webpage cannot be found".
What is the proper REST query to return items where the column values "ePR Name" and "ePurchaseRequestName" are not equal?