vgrem / phpSPO

Microsoft 365 Library for PHP.
MIT License
360 stars 117 forks source link

Recursive and Rowlimit not working #345

Open badger-mark opened 4 months ago

badger-mark commented 4 months ago

I have a Sharepoint 2013 On Prem instance (migrating to SPO shortly). I have a List with over 500k items in it. We have a View inside of this List that usually returns less than 200 records. I cannot query this List directly with a CAML query without hitting the View threshold due to unindexed fields being used in the CAML query.

The View works just fine in the web interface, so I used this package to obtain the View properties and got the ListViewXml property of the View. This is a more verbose CAML query for that particular View. I then passed that CAML query into getItems() and it still hits the view limit threshold. Removing the Scope="Recursive" solves the problem but I need the query to search recursively. I have a row limit of 200 and have paged set to true.

It's almost as if the package isn't recognizing the the row limit and the paged parameters from the query. The examples for how to read large lists simply do not work and seem to be a mashup of different (older versions) of the package. They all return the same threshold limit error.

Does ANYONE have a working example of working with Lists that greatly exceed the 5k view threshold?