Compartilhar via


How to list checked out documents when exceeding the list view threshold

We recently had the challenge with showing users a list of the documents they had checked out. This was important to the users, since it is easy to forget which documents you have currently checked out. At first, it seemed trivial to get this via the “Relevant Documents” web part.

And then configuring it to show checked out documents only.

Blog - docs checked out to me - web part config

In our test environment, this worked just fine. But, going to production, the number of documents passed the magic limit of 5000. Then, our web part started showing an error message, saying we had passed the list view threshold.

Blog - docs checked out to me - error message

Hmm, not so good. After some thinking, we came up with the simple solution of creating a view filtered on the “Checked Out To” column.

Blog - docs checked out to me - configure view

Then, we added a normal “list view” web part for our “Agreements” library.

Blog - docs checked out to me - add list view web part

And configured it to use our new view.

Blog - docs checked out to me - configure list view web part

Now everything seemed to work fine. But, beware, it does not! It now only scans the first 5000 entries and then skips the rest. If you check out document no. 5001 or above, it will not be shown in this web part. The solution is to add an indexed column for “Checked Out To”. To allow the creation of that index, we need to temporarily lift the list view threshold. This is done via Central Administration, under “Manage Web Application” > “General Settings” > “Resource Throttling”.

Blog - docs checked out to me - resource throttling

Then, open up a one hour slot at a convenient time, preferably when few users are accessing the solution.

NOTE! You should probably remove this windows after having done the rest of this configuration!

Blog - docs checked out to me - happy hour

Next, go back to your document library, and then to “Library Settings”. We can see it’s giving us the warning.

Blog - docs checked out to me - list threshold exceeded

Scroll down to the last part of the “Columns” section and click the “Indexed columns” link.

Blog - docs checked out to me - indexed columns

Then, add an index for for “Checked Out To”.

Blog - docs checked out to me - created indexed column

Adding the index shouldn’t take too long, and then we will get a complete list of our checked out documents.

Blog - docs checked out to me - working sample

As long as you have fewer than 5000 documents checked out to yourself, that is Winking smile