We have a page that is filtered to show so many records from another list on that items' display page. This issue is that this list has finally hit 5000 items.

Under 'Data View Tools' options in SharePoint Designer, I can see that the filter is set, but why is it still saying that we are exceeding this threshhold limit when less than 50 items are ever actually displayed?

Here is what it is saying XSL Editor:

<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
    <xsl:output method="html" indent="no"/>
    <xsl:decimal-format NaN=""/>
    <xsl:param name="dvt_apos">&#39;</xsl:param>
    <xsl:param name="CourseID" />
    <xsl:variable name="dvt_1_automode">0</xsl:variable>

    <xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
        <xsl:call-template name="dvt_1"/>
    <xsl:template name="dvt_1">
        <xsl:variable name="dvt_StyleName">NumTitl</xsl:variable>
        <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[normalize-space(@Course_x0020_ID) = $CourseID]" />

        <xsl:variable name="dvt_RowCount" select="count($Rows)" />
        <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
            <xsl:when test="$dvt_IsEmpty">
                <xsl:call-template name="dvt_1.empty" />
                <ol style="padding-top: 10px">
                    <xsl:call-template name="dvt_1.body">
                        <xsl:with-param name="Rows" select="$Rows" />
    <xsl:template name="dvt_1.body">
        <xsl:param name="Rows" />
        <xsl:for-each select="$Rows">
            <xsl:call-template name="dvt_1.rowview" />
    <xsl:template name="dvt_1.rowview">
        <li class="ms-vb">
            <xsl:value-of select="@Author" disable-output-escaping="yes" />
        <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
                <br /><span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view" />
    <xsl:template name="dvt_1.empty">
        <xsl:variable name="dvt_ViewEmptyText">Nobody has registered for this course.</xsl:variable>
        <table border="0" width="100%">
                <td class="ms-vb">
                    <xsl:value-of select="$dvt_ViewEmptyText" />

If I look at the filter options in SharePoint Designer I see that the filter is Course ID Equals [CourseID] which returns less than 50 items.

  • The threshold limit works on total number of items available in list so This message is an obvious behavior. If you create a view with filtered items than it will not show this message. – Hardik Jun 15 '16 at 17:23
  • I filtered the list's All Items view. I don't see where to set a view on an items display page like you can in 2013. – MickB Jun 15 '16 at 17:25
  • You need to create a different view & filter items from view settings page. so it will not show 5000 items. If the view itself contains the 5000 items than the problem will be same for you – Hardik Jun 15 '16 at 17:31
  • Edited question. Maybe it will help – MickB Jun 15 '16 at 17:35

You can only bypass the view threshold Only if your View is filtering on a column that you have added an Index for. If there is no index on the column you Filter On, your view is technically still performing a full list scan (and exceeding the limit) in order to Filter.

To create an index on a column you want to use for your filter, go to "List Settings" -> "Metadata Navigation Settings", and in a small hyperlink in the descriptive text near the bottom left of the page, click on "Indexed Columns".

Unfortunately, if your list has already exceeded the View Threshold, you will probably also get an error about that same threshold when you try to create an Index (apparently, Microsoft assumes you can see the future and will build indexes before you reach the limit). So you will either need to temporarily remove some items in order to create your indexes, or ask a Farm-level Administrator to temporarily increase the list view threshold so you can create your indexes, then they can put the threshold back at 5000.

  • Do I need to do anything after I index the column? – MickB Jun 15 '16 at 17:48
  • Well, you have to make sure your view(s) is/are filtering on that column -- and the results would still have to fit under the view threshold. Since you likely have multiple views filtering on different fields, you'd best add indexes for each of the fields being used for filtering. – willman Jun 15 '16 at 17:49
  • Right, this will resolve the issue on the list. But not on the dataview webpart. Even if I set paging to 100 it still doesn't like it. – MickB Jun 15 '16 at 17:58
  • Your web part also needs to obey the threshold, so you need to configure the caml query in the web part to filter on an indexed column just as you would a view – willman Jun 27 '16 at 8:55

So I was looking in the wrong place. The datasource was defined with SelectCommand="&lt;View&gt;&lt;/View&gt;". I changed the query and used a where clause to filter the data.

            <FieldRef Name="FieldName"/>
            <Value Type="DataType">Value</Value>

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.