Friday, February 20, 2009

Content and Structure Reports: All Checked out documents

Ever wanted to see all documents that are checked out right now and deal with them all in one go? Not only the ones checked out to you? here is the CAML syntax for your Content and Structure Reports Library located at the root of your publishing enabled SiteCollection:

<Where><Geq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="int">0</Value></Geq></Where>

Simply create a new Item in that list with the above text for the CAML syntax, give it a Title and meaningful description and you're set!

2 comments:

GrayGhost said...

Great tip. My boss came to me wanting this feature. I havent been able to find much information on this feature.
Does it take awhile for checked out files to display?
I have 3 files in a doc lib, one has been checked out for a few days and one I checked out right after I created the new list item in the Reports list. The one that was checked out a few days ago displays in the list of files checked out, the file that I checked out after creating the report does not show up.

Unknown said...

Hmm. Could have to do with the search configuration. these reports plug into the search API of SharePoint and effectively perform a search on the index. Thus the latest changes are not in the index yet and not in your reports. But I'm not 100% sure on this. try changing the frequency of your incremental search or perform an adhoc crawl to validate this behaviour.