-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
I'm calling the SharePoint REST API using the RenderListDataAsStream endpoint. We use the endpoint and then pass in the body a CAML query that looks like this:
<View Scope="Recursive">
<ViewFields>
<FieldRef Name="ID" />
<FieldRef Name="Title" />
<FieldRef Name="FileRef" />
<FieldRef Name="Date1" />
<FieldRef Name="MultiLineText1" />
<FieldRef Name="Person1" />
<FieldRef Name="Choice1" />
<FieldRef Name="Text1" />
<FieldRef Name="Number1" />
<FieldRef Name="Lookup1" />
<FieldRef Name="Choice2" />
<FieldRef Name="Lookup2" />
<FieldRef Name="Lookup3" />
</ViewFields>
<RowLimit Paged="TRUE">10</RowLimit>
<Query>
<Where>
<And>
<Contains>
<FieldRef Name="Text1" />
<Value Type="Text">477</Value>
</Contains>
</And>
</Where>
<OrderBy>
<FieldRef Name="DueDate1" />
</OrderBy>
</Query>
</View>We currently have a list that exceeds the list view threshold and have therefore placed in the appropriate indexes on the list columns. In this case Text1 and DueDate1. When paging through the results I expect to get back the RowLimit that was placed in the call or until I have reached the end of the list results.
Observed Behavior
Instead of receiving the desired results I get back the following 200 response (not 500 list view threshold exceeded response)
{
"Row": [],
"FirstRow": 1,
"FolderPermissions": "0x7fffffffffffffff",
"LastRow": 0,
"RowLimit": 10,
"NextHref": "?Paged=TRUE&ix_Paged=TRUE&ix_ID=1030979&PageFirstRow=1&View=00000000-0000-0000-0000-000000000000",
"FilterLink": "?",
"ForceNoHierarchy": "1",
"HierarchyHasIndention": "",
"CurrentFolderSpItemUrl": ""
}Which is super weird as it is giving me a next page but did not actually get any items on the first page. If I OrderBy Ascending things work, but descending does not.
Steps to Reproduce
So how to reproduce :) You can see that the ID in the returned result is quite high (in the millions). We had an issue where items were creating and deleting for a number of weeks, this has finally been stopped but I'm afraid this messed up the SharePoint Online lists somehow. I've tried removing and adding the indexes back but that did not fix it. Ultimately to reproduce someone would need to create items and then delete them, check if this affects their paging. Maybe someone at Microsoft can help as I'm hoping a timer job or something we can't see on our end needs to run to fix things but thought I would submit a ticket. Hope someone can help.
Daniel