List View Threshold Exceeded Affecting NewForm.aspx? RRS feed

  • Question

  • I have a single list that exceeds 5000 items, and have taken the necessary steps (indexing columns, creating views that limit items displayed, etc.).  This seems to be working, however I have found that users without Admin priveleges to the list still get the following error message when attempting to add new items via a custom newform.aspx page:

    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.

    Learn about creating views for large lists.

    While I understand that views are affected by the threshold, I don't understand why users would get the message when attempting to add new items.  Interestingly, they get the message when using a custom new form, but when using the default new form do not.

    Is there some type of setting on the custom new form that I need to change to get rid of the message?  I know that I can increase the list threshold, but that doesn't seem to be the right way to handle the new form issue since the items are not being displayed in any way (i.e. lookup field, view).

    Thanks in advance!

    Thursday, August 16, 2012 5:05 PM

All replies

  • Chanda,

    Is your custom newform.aspx using the object model to insert new items?

    I would first look to see if you are populating a SPList by using the SPList.Items.Add, this mechanism grabs all list items at once.

    Another suggestion is to use SPList.AddItem.



    If this isn't the case them please expand your explanation of the problem.

    If this helps you then please mark the post as helpful.
    If this answers your question then mark it as the answer.
    If another contributor in the thread answers your question then please do the right thing.
    And as always most answers for SharePoint are based on "It depends"

    Friday, August 17, 2012 3:21 PM
  • Hello Neal,

    We are not using the object model to add items.  The custom newform.aspx was created using the options available in SharePoint Designer - make a copy of the original newform.aspx, edit to hide the default form and insert a custom new item form, hide some of the fields via CSS so that end users only see a subset of them when adding items.

    And to clarify, users see the message, in place of the form, when the custom newform.aspx is first displayed; they do not have the option of even trying to complete the form to submit.

    The list itself contains columns of type single-line text, multi-line text, person/group, number, calculated, yes/no, choice, and date/time - no lookups that might be trying to pull too many items when the form is displayed.  The only other thing I can think of is that the custom newform.aspx page was created prior to our upgrade to SP2010, but I am not sure that would have any effect related to the error.


    Friday, August 17, 2012 7:29 PM
  • Hi,

    Here are several discussions and articles can be referred to.

    SharePoint 2010: How to Change the List View Threshold and Other Resource Throttling Settings


    exceeds the list view threshold 5000 items in Sharepoint 2010


    Problem with list item threshold - what's the expected behaviour?



    TechNet Community Support

    • Edited by Ivan-Liu Thursday, August 23, 2012 1:58 AM
    Thursday, August 23, 2012 1:58 AM
  • Chanda,

        I am experiencing the same issue!  I customized the form in 2007.  After an upgrade to 2010 no matter what I do I cannot switch the form back to the original form.  It is stuck on using the customized form.  Have you had any progress in resolving this matter?  Please share.

    Thursday, August 23, 2012 3:49 PM
  • Ivan-Liu,

    Thank you for referencing the three articles, however, none of them address my specific issue.  Do you have any idea why the list view threshold would be affecting the newform?  That is my question.  I have been successful in managing the list views based on instructions such as those in the articles you gave, so I do not understand why it would still be affecting a custom newform for the list - I wouldn't expect that behavior and haven't found that it is documented anywhere as such.


    Saturday, August 25, 2012 4:19 AM
  • Hi BGDavis,

    No luck so far on fixing this.  When you say that you cannot switch the form back to the original, what exactly do you mean?  Are you referring to setting your custom form as the default newform in SPD, or something else?  I created a separate custom newform (leaving the original intact because we still needed it as an option for some users), so my issue now is that the error is displayed when using the custom form, but not when using the default newform.  Strange to me, I suppose my next step will be to try to recreate the custom form in SPD 2010 and see if I get the same results with any custom newform or just my upgraded one.  I will let you know how that goes.


    Saturday, August 25, 2012 4:22 AM
  • It seems that the default newform works fine, as well as a custom new form; however, as soon as I make any change to the custom newform itself (i.e. to hide a row) I start getting the error message.  I was able to get around this by inserting my custom new form, then hiding the necessary rows via JavaScript as opposed to trying to modify the custom new form itself.

    While this works, we have now run into exactly the same issue on another list that just hit the 5000 mark.  The custom new form displays the error, even though the proper steps have been taken to account for the list threshold.  The problem this time is that I have customized the newform to adjust the layout, not to hide fields, so I am back in the same spot.

    I would appreciate any insight as to why the list threshold is affecting a custom list form, and what I can do to work around that.


    Wednesday, August 29, 2012 6:29 PM
  • Hello Chanda,

       I forgot my account because I just created it so this is my new one! In any case, I cannot revert back to the original SP generated form.  I get a contact the administrator error.  What I have found though is that when you migrate a 2007 list is when you have these issues.  If you create a brand new 2010 list these issues don't arrive.  Please do keep me updated on your progress and I will let you know what I find as well.

    Thursday, August 30, 2012 6:14 PM
  • Hi,

    I had the same issue. What I ended up doing is, i wrote a powershell to clone the views and added

    $view.XslLink = "main.xsl" for every view while cloning.


    1) Clone the original view x to view say x1

    2) delete the view x and and set the view x1 as default

                 $newView = $view.Clone($view.Title, $view.RowLimit,  $view.Paged, $view.DefaultView)


    See if this helps.



    Friday, October 5, 2012 8:11 PM
  • Chanda,

    I ran into the same issue and was able to fix it by adding an additional filter to the CAML query.  Looking at the form in SharePoint Designer, the data source had this filter:

             <FieldRef Name='ContentType' />
             <Value Type='Text'>Item</Value>

    I just added another condition that would only return a few items. So my query ended up like this:

                <FieldRef Name='ContentType' />
                <Value Type='Text'>Item</Value>
                <FieldRef Name='AuthorLastName' />
                <Value Type='Text'>Dickens</Value>

    The queries above have been beautifed for easier reading.  When actually viewing / modifying the query, look for the <SharePoint:SPDataSource> tag in the custom form. The query is inserted in the "SelectCommand" property, like this:

    SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;And&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;ContentType&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Item&lt;/Value&gt;&lt;/Eq&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;AuthorLastName&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Dickens&lt;/Value&gt;&lt;/Eq&gt;&lt;/And&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;"

    Hope that helps...

    Monday, January 28, 2013 9:13 PM
  • Many thanks Grant, it worked and saved lot of time.
    Thursday, February 26, 2015 1:50 PM
  • Hi Gant & Javeed,

    Can you please clarify more what should be edited in the New Custom form as to be able to open it normally without giving the exceeding error?

    What should be edited in the SelectCommand exactly?

    Thanks in advance

    • Edited by Ranouon Tuesday, June 16, 2015 8:06 PM
    Tuesday, June 16, 2015 8:05 PM
  • Hi Ranouon,

    The key is to add a filter into the SelectCommand (even though it's a New Item form and shouldn't be returning any data).  The filter would need to reference a column that exists in your list.  You could try adding something like:

       <FieldRef Name='Title' />
       <Value Type='Text'>Ranouon</Value>

    Hope that helps...

    Wednesday, June 17, 2015 8:48 PM
  • Great job Grant!

    It is working fine....

    Thanks a lot....

    Friday, December 4, 2015 12:09 AM