0

There is a SharePoint list with a lookup column. Now I want to search the SharePoint list with filter on lookup column. E.g. :

https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/items?$expand=lookupcolumn&$select=Title,parentlookupcol/lookupcolumn&$filter=substringof('US2017 - 0002',lookupcolumn) 

Syntax filter = lookupcolumn eq 'value' is working, but I want to filter the list even if I pass part of the string.

Please share an example of how I can achieve this.

Thanks in advance usha

1 Answer 1

0

isn't the problem that you are filtering by the lookupcolumn value and not the lookup column Title?

you'll have to expand the lookupcolumn and apply the filter to the text field

Expanding columns in lookup fields

4
  • Hi, Thanks for the response. Query worked with this sharepoint.com/sites/sitename/_api/web/lists/… = lookupcolumn eq 'value'. But when using "sharepoint.com/sites/sitename/_api/web/lists/… - 0002',lookupcolumn) " , it failes Commented Dec 8, 2017 at 3:46
  • I had expanded the lookup column, but still no luck Commented Dec 8, 2017 at 4:23
  • have you tried $filter=substringof('US2017 - 0002',lookupcolumn\Title) Commented Dec 8, 2017 at 14:20
  • Yes I tried... But it give me http 500 error Commented Dec 8, 2017 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.