Skip to content

How can we exclude a specific column from the SharePoint Get Items call? #10778

@bhoomesh-spe

Description

@bhoomesh-spe

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version - 47.0.7727.56
  • SPFx version - 1.21.1
  • Node.js version - 22.14.0
  • PnP JS - 4.17.0

Issue description

We have created a SharePoint site collection and a SharePoint list named “My List Data” with multiple columns configured as per our requirements.

We also developed an SPFx project for customization and implemented the following code to retrieve data from this SharePoint list.

import { spfi, SPFI, SPFx } from '@pnp/sp';
import '@pnp/sp/items';
import '@pnp/sp/lists';
import '@pnp/sp/webs';


const sp: SPFI = getSP();
const listData = await sp.web.lists.getByTitle("My List Data").items.select("*").top(5000);
console.log("listData:", listData);

Due to the large number of columns and the high volume of data, it is impacting the overall performance.

We have tried to investigate at our end and found that the performace aafect due to multiline text column which contains large amount of data

Therefore, we need to exclude the multiline text column from the Get Items call. Since the list contains more than 50 columns, we will need to explicitly specify each required column in the Select query instead of using select("*").

Is there a way to exclude only the multiline text column from the Get Items call without having to explicitly list all other columns?

Thanks

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.sharepoint-developer-supportsharepoint-developer-support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions