0

Using the manual approach, I have copied some 5100 list items from my SP 2010 site's splist into O 365 - SPO list. But the issue is that,i am unable to do any kind of operations because i am getting the error , list view threshold crossed 500 items , in my SPO list.am already having some 10 views created and i am unable to do any kind of operations because of this list view threshold.

whats the approach, i need to take now in order to further manipulate this list? i tried the belwo code to get the num of items in each view , but it throws error :

Message:

The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.

List RCAList = web.Lists.GetByTitle("testlist");
if (RCAList != null)
{
    mClientContext.Load(RCAList);
    mClientContext.ExecuteQuery();
    Microsoft.SharePoint.Client.View allitemsview = RCAList.Views.GetByTitle("All Items");
    mClientContext.Load(allitemsview);
    mClientContext.ExecuteQuery();
    CamlQuery query = new CamlQuery();
    query.ViewXml = allitemsview.ViewQuery;
    // Based on the query load items
    try
    {
        items = RCAList.GetItems(query);
        mClientContext.Load(items);
        mClientContext.ExecuteQuery();
        Console.Write(items.Count);
    }
    catch (Exception expinn)
    {
        MessageBox.Show("error thrown " + expinn.Message + "===" + expinn.StackTrace);
    }
}
0

I believe you're limited to 5000 items on a lookup based on your code regardless of the list view setting. if on premises, you could get the view limit set to a higher limit for testing. (They're a way to have it automatically larger during nighttime so you can fix this kind of thing. But I don't think that will help. You'll need to index field and then specify the indexed field for filtering in the query (be sure it's the first field to use for filtering in a lookup or in a view).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.