Struggling with errors when trying to filter a SharePoint document library by file name using PnPjs?

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!

Answer №1

Having over 5000 items in your list may limit filtering options to indexed columns only.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Have you heard about using Angular-cli to bootstrap with version 3 along with jQuery integration in Angular

As I prepare to embark on a new project, I am considering Angular 2.0 as a solid framework to utilize for its routing, components, and directives. However, there are existing elements built with Bootstrap v3 and jQuery that I would like to incorporate into ...

Encountering an "emit" error while working with PouchDB in Angular 2

Within my Ionic2 application, I have created a provider to inject PouchDB design documents. However, I encountered this TypeScript error: Typescript Error Cannot find name 'emit'. src/providers/design-docs.ts if (user.location) { emit(user ...

Is Typescript pass by value or pass by reference?

I have these files: data.ts: export const myData { info1: "info1", info2: "info2", ... ... } and I also have this class: my-class.ts export class MyClass { private data: any; constructor(data: any) { this.data = data ...

Automatically insert a hyphen (-) between each set of 10 digits in a phone number as it is being typed into the text

I'm attempting to automatically insert a hyphen (-) in between 10 digits of a phone number as it is being typed into the text field, following North American standard formatting. I want the output to look like this: 647-364-3975 I am using the keyup ...

Angular 4 - Issue with data retention beyond subscription boundaries

Within my Angular service, I have the following code: this.signInService.signIn(this.model).subscribe(user => { this.user = user, console.log(this.user.Username) }); console.log(this.user.Username); There are two instances of console.log st ...

Navigating with Angular Routing Parameters

Is there a method for retaining the parameters associated with a route when navigating to a different page? For instance: localhost:4200/welcomepage?param=true => localhost:4200/secondpage?param=true ...

Compiler failing to recognize specialized TypeScript typings

In the directory src/@types/yargs-interactive/index.d.ts, I have created a typings file for https://github.com/nanovazquez/yargs-interactive. The contents of this file are as follows: declare function yargsInteractive(): any; declare namespace yargsInter ...

Error in Transpilation of iOS Delegate in NativeScript (Variable __metadata Not Found)

I'm facing an issue while trying to incorporate an iOS delegate in a NativeScript plugin. The error I'm encountering reads as follows: Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can& ...

Retrieve the ultimate information from the Angular service

Within my angular 6 project, I am dealing with a product_id array, product_id: any = ["123", "456"]; ngOnInit : ngOnInit() { this.product_id.forEach(element => { this.httpClient.get('https://api.myjson.com/bins/hiolc').subscribe ...

What causes npm start to fail in Angular 6 after incorporating social login functionality?

I am currently working on integrating Social Login functionality into my app. I have attempted to incorporate the following: npm install --save angular-6-social-login-fixed npm install --save angular-6-social-login npm install --save angular-6-social-log ...

Strategies for testing a NodeJS controller that utilizes a nested dependency

My current project involves a service that loads a JSON from a file: import { promises, existsSync } from "fs"; import { dataPath } from "../../utils"; export const getUsersService = async () => { if (!existsSync(dataPath)) { console.log("File ...

Find the type constructor of each argument in a TypeScript constructor function

In my exploration, I have come across TypeScript libraries that, with just a simple annotation added to a class, can automatically inject that class into the constructor of another by specifying the argument type. It works in a manner similar to this: @so ...

The Angular expression has been modified after being examined

I've encountered a common error in my Angular application, but I'm struggling to pinpoint why it's happening and how to resolve it. I've attempted various approaches such as using setTimeout, delay(0), and switching to different hooks, ...

Agreements: What is the best way to align a sum/union type?

Is there a way to create an appropriate matcher in pacts (javascript version, consumer site) for an api endpoint that returns an array of a sum type? For example, consider the scenario where we have the endpoint /api/events that gives back a list of dicti ...

Error encountered: The configuration for "@typescript-eslint/parser" specifies the project option, which does not align with the project settings in the .eslintrc.js file

After using create-react-app to kickstart a fresh typescript react application and then integrating firebase, I proceeded to run firebase init. During this process, I opted for the typescript selection, enabled es lint, and also activated functions. Upon ...

Tips for mocking a module with a slash character in its name?

When it comes to mocking a standard npm project, the process is simple. Just create a __mocks__ folder next to the node_modules folder, then name the file after the package and insert the mock contents. For example: /__mocks__/axios.ts However, I encount ...

Creating a Blank Mapped Type in TypeScript

Suppose I define a generic mapped type that associates keys with functions. type SomeMappedType<T, R> = { [K in keyof T]: (...args: any[]) => R } This is then passed to my consuming function through an options type where it's optional. t ...

Could one retrieve the value of a type and save it as a constant?

Can I achieve something similar to this: type YesType = true; const myVar = GetTypeValue<YesType>(); // In this instance, the value true is assigned Is it feasible to assign other fixed values to constant variables like in C++? ...

Update the component with the current route and state synchronization with react router dom

Is there a method to synchronize the active route in the browser with the component state? When I click on "Route 2" in the navigation bar, it gets highlighted as the active route and the browser URL shows "/route2". However, upon refreshing the page, "Ro ...

What steps can be taken to resolve the issue "AG Grid: Grid creation unsuccessful"?

For my project, I decided to use the modular import approach for AG-Grid. This means importing only the necessary modules instead of the entire package: "@ag-grid-community/core": "31.3.2", "@ag-grid-community/react": ...