0

I have SP online list/document libraries which are going to exceed 5000 items threshold limit. I have created index columns.

Question: I have a custom form, where I will retrieve the data from the list to show up on the form. Will the rest API I am having will work or do I need to take care of anything else.

$pnp.sp.web.lists.getByTitle('ABC').items.filter("ReqID eq '" + UniqueID +'").orderById("ID").get().then(function() {

Can you please advise

Thanks, Kevin

acarlstein
  • 1,799
  • 2
  • 13
  • 21
ram 369
  • 1
  • 1

1 Answers1

0

This is list view threshold issue. For sharepoint online, you can Index Columns Used as View Filters:

Or you can make use of other pnp js methods:

enter image description here

// we can also use filter as a supported odata operation, but this will likely fail on large lists
const allItems: any[] = await sp.web.lists.getByTitle("BigList").items.select("Title").filter("Title eq 'Test'").getAll();
console.log(allItems.length);

BR

Baker_Kong
  • 1,739
  • 1
  • 4
  • 9