Question

After 5000 items threshold is exceeded, custom new form stops working even though I did index a couple of columns, and views are working fine, so as default the new form. But when I want to open the custom new form, I get an error.

Read somewhere it might be a problem with the query which should be changed, but I can't find a concrete explanation or example.

Error:

This view cannot be displayed because it exceeds the list view threshold (5000 items) enforced by the administrator.

To view items, try selecting another view or creating a new view. If you do not have sufficient permissions to create views for this list, ask your administrator to modify the view so that it conforms to the list view threshold.

Was it helpful?

Solution 2

Solved it.

So what was necessary to be done in form was to add part of code in query. This was original code:

<Query>
  <Where>
   <Eq>
    <FieldRef Name="ContentType"/>
    <Value Type="Text">Item</Value>
   </Eq>
  </Where>
</Query>  

What I did was adding additional part of query

<Query>
  <Where>
   <And>
    <Eq>
     <FieldRef Name="ContentType"/>
     <Value Type="Text">Item</Value>
    </Eq>
    <Eq>
     <FieldRef Name="name of one of indexed columns"/>
     <Value Type="Text">One of its values</Value>
    </Eq>
   </And>
  </Where>
</Query>

Additional condition was necessary so I get only couple of values and not whole list of 5000+ items. Instead of < and > you should put &lt; and &gt;. " is &quote; in new form.

Explanation I found here in similar topic.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top