CQWP that lists all documents checked out to me

Hi everyone!

I thought I would show you how you could make the CQWP list all documents in your Site Collection that are checked out to me.

The thing is, if you set the CQWP to search the whole site collection or a site for that matter, and then choose “List Type” “Document Library” you will not be able to choose the filter “Checked Out To”.

So how should we do to then?

First of all if you navigate to “Site actions” and “Manage Content and Structure” and then choose “Content and Structure Reports” you will find the reports and the CAML that is used for them. What you should do is to copy the CAML query from the report “Checked Out To Me”.

<Where><Eq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="Integer"><UserID/></Value></Eq></Where>

Now, add a CQWP to your page and set it to search a site of your choice, set the “List Type” to “Document Library” and give it a name, chrome type and so on, but don’t set any filters.

Now export the CQWP and open it with Notepad.

Lookup the property “QueryOverride” and replace that row with this one:

<property name="QueryOverride" type="string"><![CDATA[<Where><Eq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="Integer"><UserID/></Value></Eq></Where>]]> </property>

As you can see I have already added the CAML from the report for you.

Now save this file somewhere and upload it to the web part gallery.

That’s it!

Now you have a web part you could add that will list all documents checked out to me.



7 Comments on “CQWP that lists all documents checked out to me”

  1. Raj says:

    very useful.
    I have a problem, The query returns too many results and I get the error:

    Your query returned a greater number of results than the web application’s query throttling limit. Please adjust the configuration of this Web Part or increase the throttling limit.

    If I select a single site it works, if I select a Site Collection I have the error. I wanted to show the user all files in Site collection.

    Any way around this besides increasing the LVT ?


    • SPNiax says:

      Hi Raj,
      I am sorry but I don’t know of any other way to do that.
      If you would come up with something, please let me and everyone else know as well 🙂


      • Ásgeir Gunnarsson says:


        This is exactly what I’m looking for but I’m getting the same error as Raj. I’m sure I don’t have more than 5-10 documents checked out but still the webpart is giving me the “Your query returned a greater number of results that the web application’s query throttling limit …”

        Can you think of anything that can cause that?

      • SPNiax says:


        It might actually be that I was misstaken when I thought that the Query result would be the documents being checked out. Infact it seems like it’s the total amount of documents being checked that it refers to. So I guess one has to modify the throttling limit…?


      • Ásgeir Gunnarsson says:

        Thanks for the answer

  2. Marco De Luca says:

    Wouldn’t “relevant documents web part” be an OOTB option for this case? This could maybe also be the solution for Raj.

    • SPNiax says:

      Thanks for participating, Marco!
      Yeah, if you want to have documents whithin the same site, that OOTB WP would work just fine.
      But if you need to have a more “global” view in one place, I think this is one way to do it.

      Rajs headache is that they got way to many documents checked out, as I see it. I can’t understand why one would want to have that amount of documents checked out.
      Maybe that person should revise how the work is done, I don’t know?
      And I don’t judge anyone for the way they work, just a thought 🙂


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s