Monday, April 13, 2009

"Checked out to me" report across SharePoint Site Collections and WebApps

Ever wondered how to view all documents checked out to you across your SharePoint farm (so across multiple Site Collections)? The following will without any custom coding provide you with a way to search for documents that have been checked out to a specific user using standard SharePoint search indexing and features.

Below you will add a new Managed Property which maps to the list meta data field holding the name of the user the item has been checked out to. You will then do a full crawl, and finally modify your Advanced Search to allow a user to search for documents checked out to the user, or to any other user for that matter.

  • Create a new Managed Property
    - Go into Shared Services
    - Go to Search Administration, Metadata Properties
    - Click to create “New Managed Property”
Use the following details:

Property name: CheckedOutTo
Type: Text
Mappings: add mapping to "ows_CheckoutUser(Text)"



  • After adding the new managed property, start a full crawl of the relevant content source

At thsi point you could go back in and verify if any items have been indexed (click on the managed search property and check the status of number of indexed items containing a value for this property). If zero, then there are no checked-out documents.

You are now ready to prepare the SharePoint Advanced Search to include an option to search for documents that have been checked out to a user:

  • Go to a Site Collection with Advanced Search, and edit your Advanced Search page
  • Modify the Advanced Search web part to include the new property as a selectable search property by adding two new entries in the properties XML for the Advanced Search Box webpart:



    The properties XML should now include the following new entries:

    In the PropertyDefs section add:
    PropertyDef Name="CheckedOutTo" DataType="text" DisplayName="Checked out to"

    And in the section ResultType DisplayName="All Results" Name="default", add
    PropertyRef Name="CheckedOutTo"
After saving these changes to the properties, your Advanced Search page should now include a new selectable property displayed as “Checked out to”:


Select the new property, enter the full name of the user (e.g. "Joe B. Loggs") and hit "Search". If the user has any documents checked out, then you should see them coming up in the results.
This is a method that is useful when not wanting to utilise any custom code or third party components.
Let me know what you think or if you find this useful. Comments always welcome.

Gabriel




No comments:

Post a Comment