Jan 082016
 

Update 1/13/2016 – Changes to script. The original script hides the list view pagination. Changes marked as Pagination Fix below.

I have a SharePoint list that has exceeded the 5,000 item limit threshold. This, of course, causes a couple of views to go bonkers.
MeetMe

I indexed several list columns but the client still needs to be able to filter the entire list. I wrote some jQuery to replace that awful message shown above.

<script src="jquery-1.10.1.min.js"></script>
<script type="text/javascript">
// jQuery extension
(function($){
    $.fn.extend({
        removeByContent: function(str) {
           return this.each(function(){
                var self = $(this);
                if(self.html().indexOf(str) != -1) self.hide();
            });
        }
    });
})(jQuery);
// jQuery Show function added 1.13.2016
(function($){
    $.fn.extend({
        showByContent: function(str) {
           return this.each(function(){
                var self = $(this);
                if(self.html().indexOf(str) != -1) self.show();
            });
        }
    });
})(jQuery);
// Script to remove the error message text.
$('.ms-vb').removeByContent('This view cannot');
$('.ms-vb').removeByContent('Operations that exceed');
$('.ms-vb').removeByContent('Learn about'); 
/* Pagination Fix if needed 
$('.ms-vb').removeByContent('try selecting another view'); 
$('.ms-vb').showByContent('Next');
*/
</script>

<script type="text/javascript">
// Remove this script if list view pagination needed and add Fix lines above.
// Let's replace one of those lines with instructions for the user.
$(document).ready(function() {
     $(".ms-vb").text(function(index,text) {
      return text.replace('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.','Please select a filter above.');
   });
});
</script>



Even though SharePoint is complaining in the background, selecting a filter will return results to the list web part.

MeetMe2