I am currently developing a new web component to showcase a list of documents in a SharePoint document library named Medicine files
. My goal is to enable users to filter these files based on various columns, including file names. While utilizing PnPjs to search for files by name, I encountered an issue with the code specific to the file name search. Here is the snippet of my existing code:
await sp.web.lists.getByTitle("Medicine files").items.filter("FileLeafRef eq 'test.pdf'").expand("File").orderBy("Created", asc)();
Upon using the Name
column, I received the following error message:
Column 'Name' does not exist. It may have been deleted by another user.
Furthermore, when attempting to utilize the FileLeafRef
property, this error was displayed:
The attempted operation is prohibited because it exceeds the list view threshold.
Various other column names like Name
, DisplayName
, FileLeafRef
, LinkFilenameNoMenu
, LinkFilename
, and BaseName
were tested without any success. I have also verified that the column name within the settings is indeed defined as Name
.
If you have any suggestions or guidance on how I could resolve this particular issue, your input would be greatly valued!