I am using a pnp code in order to count a set of items in a list based on a query in order to get a value for the counted items.
//Filter Criteria
filter = "PersonAddressIsOld eq 0 and AddressTypeFk/Id eq 2 and PersonIDfk/Id eq " + fdPersonID + " and ID ne " + intItemIDVal;
//call pnp and check for origine Adddress
pnp.sp.web.lists.getByTitle("Personslist").items.select("Id", "Title", "PersonDetails").filter(filter).get().then(b => {
console.log(b);
if (b.length > 0) {
fd.field('fieldName').value = b.length ;
}
});
I will use too the count returned value create other functions.
The problem is that the list has more than 5000 items.
What is the best Pnp syntax or code to count the list items and get the count value where items over than 5000