Forum Discussion
swamisnawale
Aug 04, 2024Copper Contributor
Sharepoint Rest API filter query not returning items
Hi All,
I'm facing issue while working with Rest API in SPFX. I wanted to know if there is limitation in Rest API for filter queries like we can only apply 'N' numbers of filters?
I have applied a filter for lookup column and it contains more than 20 lookup conditions for e.g
https://<your-site-url>/_api/web/lists/getByTitle('<your-list-title>')/items?$select=*,Author/EMail,Author/Title,SecondAssignee/Name,SecondAssignee/Title,AssignedTo/EMail,AssignedTo/Title,ProjectNameLookup/Id,ProjectNameLookup/ProjectName&$expand=Author,SecondAssignee,AssignedTo,ProjectNameLookup&$filter=Author/EMail eq '<author-email>' or AssignedTo/EMail eq '<assignedto-email>' or SecondAssignee/EMail eq '<secondassignee-email>' or ProjectNameLookup/ProjectName eq '<project-name-1>' or ProjectNameLookup/ProjectName eq '<project-name-2>' or ProjectNameLookup/ProjectName eq '<project-name-3>' or ProjectNameLookup/ProjectName eq '<project-name-4>' or ProjectNameLookup/ProjectName eq '<project-name-5>' or ProjectNameLookup/ProjectName eq '<project-name-6>' or ProjectNameLookup/ProjectName eq '<project-name-7>' or ProjectNameLookup/ProjectName eq '<project-name-8>' or ProjectNameLookup/ProjectName eq '<project-name-9>' or ProjectNameLookup/ProjectName eq '<project-name-10>' or ProjectNameLookup/ProjectName eq '<project-name-11>' or ProjectNameLookup/ProjectName eq '<project-name-12>' or ProjectNameLookup/ProjectName eq '<project-name-13>' or ProjectNameLookup/ProjectName eq '<project-name-14>' or ProjectNameLookup/ProjectName eq '<project-name-15>' or ProjectNameLookup/ProjectName eq '<project-name-16>' or ProjectNameLookup/ProjectName eq '<project-name-17>' or ProjectNameLookup/ProjectName eq '<project-name-18>' or ProjectNameLookup/ProjectName eq '<project-name-19>' or ProjectNameLookup/ProjectName eq '<project-name-20>' or ProjectNameLookup/ProjectName eq '<project-name-21>' or ProjectNameLookup/ProjectName eq '<project-name-22>' or ProjectNameLookup/ProjectName eq '<project-name-23>' or ProjectNameLookup/ProjectName eq '<project-name-24>' or ProjectNameLookup/ProjectName eq '<project-name-25>' or ProjectNameLookup/ProjectName eq '<project-name-26>' or ProjectNameLookup/ProjectName eq '<project-name-27>' or ProjectNameLookup/ProjectName eq '<project-name-28>' or ProjectNameLookup/ProjectName eq '<project-name-29>' or ProjectNameLookup/ProjectName eq '<project-name-30>' or ProjectNameLookup/ProjectName eq '<project-name-31>' or ProjectNameLookup/ProjectName eq '<project-name-32>' or ProjectNameLookup/ProjectName eq '<project-name-33>' or ProjectNameLookup/ProjectName eq '<project-name-34>' or ProjectNameLookup/ProjectName eq '<project-name-35>'&$orderby=Created desc&$top=999
When I run above query, then its not reurning any items. but when I filter query, then it is returning the items.
I saw numbers of articles where they say the rest api has limit of 6000 char, some says 2048. So I am getting confsed here.
No RepliesBe the first to reply