Link to a Document Content Type SharePoint 2007

One of the questions that often comes up with Sharepoint regarding document libraries is "how do I link to a document stored in one library in others?"  Unfortunately, there was no way to do this prior to the 2007 version without actually duplicating the document and uploading it into each library independent of each other.  This obviously has ramifications by creating separate versions which will soon be out of sync.  Changes made to one document won't be represented in the others.

To resolve this, SharePoint introduced a feature known as the Lint to a Document Content Type.  If you aren't yet familiar with the concept of Content Types in SharePoint, you need to research this.  I will attempt to post more on this subject later, but for now just understand that it is a way of defining the contents of a library beyond the document type that it was created as (.doc, .xls, etc...).  The Link to a Document content type is a predefined type that creates a record in the library that will point you to another library.  In order to use this feature you must first enable the use of content types within your library.  To do this, you go to the settings tab of your document library and click the Advanced Settings link.  Select Yes for Allow management of content types and click OK.


Now that you have enabled the ability to use content types, you must associate the content types you wish to use within this library.  Back on the Document Library Settings page, you will now see a list of content types that are currently associated.  By default Document will be enabled.  Click the Add from existing site content types.


Choose the Link to a Document selection from the List Box and click Add >.  Once you've done this you will now be able to go to your document library and click the new button and you will now see Link to a Document in the menu.  Click this to provide a name and url for the document.


Although this may seem like a small thing, it gives us the ability to maintain a single copy of a document with all the features like versioning, workflows, and approvals that we chose SharePoint for in the first place while still allowing us to gain access to it in multiple places throughout the application.

Target your Audience with MOSS 2007

As I'm delving into the world of MOSS 2007 I'm finding lots of cool features and well thought out ideas that Microsoft has brought to the table.  One such feature is known as the Audience.  The audience provides a more dynamic way to target specific content to users for which it is appropriate.  An audience is created by specifying rules from the data contained in the user profile data store.  Because an audience is closely related to user profiles the administration interface to control them is found in the Shared Services Administration site.

To create a new audience, you start by specifying a name, description and an owner.  You then select whether you want the audience to be composed of people that satisfy all of the rules, or any of them.


On the next screen we begin adding rules to the audience.  We will create a collection of rules that will be evaluated to compile the membership in this audience.  In the following screen capture, you can see that I have selected to base my rule on a Property. 


Selecting property allows me to target any of the fields specified in a users profile to validate that my rule has been satisfied.  In this case I'm looking for anyone who listed SharePoint as one of their skills in their user profile.  This rule on it's own would not limit the scope of my audience significantly enough though.  I want this audience to target SharePoint developers and at this point I'm pulling in everyone that lists sharepoint in their skills profile.  This could include administrators, designers, or general business users as well.  So how do I narrow the scope?  By specifying more rules.  So now I go back and add an additional rule to the collection.


We will repeat the steps we did earlier in adding our first rule but I will choose User this time.  When I select User, the drop down for Operator has two options.  First up is "Reports Under".  This allows us to specify a user in the value field that all users must be below in the organizational hierarchy.  This feature is dependant on a well populated Active Directory though.  The second option is  "Member Of".  This allows us to provide a security group or distribution list in our value field.  So for my example I would select Member Of and choose my Software Developers security group. 

Once I have specified all the rules I wish to list for this audience, I can then compile it.  Compiling it sets SharePoint loose to go analyze the users in my system and comparing them against the rules that I have specified to determine membership in this audience.  Changes in our user base would necessitate re-compilation of the audience, so you can set a timer job to re-compile on a schedule.

Now that I have built my audience, I can use it to filter visibility to specific content within my site.  For the sake of this example lets assume that I have added a SharePoint Developers Announcements List to my site.  I then drop the list on the homepage.  I go to edit mode on the web part and expand the Advanced section in the tool panel. I then scroll down to the bottom and click the browse button next to the field for Target Audiences.  I then get the following dialog that allows me to select my newly created audience.


After selecting my Audience with the dialog, and applying it to my web part, I then can add announcements that will only show up for users who meet the specified criteria.  This is a really slick way to target content specific to users.  The nice thing is that it eliminates the need to create additional security groups that need managed for this type of customization and can mine the information provided by users themselves about their profiles (if you are using this feature). 

Where I think Microsoft went wrong with this feature is that the creation of audiences can only be done in the Shared Services Provider site.  This means that Tier 1 administrators (those with rights to Central Admin and Shared Services Provider) are the only ones who can create them.  It would have been nice to allow site owners to create and manage their own audiences.  I believe this will be an under-utilized feature for this reason, but that said I think it's one that deserves a look.