Dedicated to development, configuration, and tips and tricks for both WSS 3.0 and MOSS

Posted by Aaron Varga on Tuesday, 3 Feb 2009 01:19

Document libraries are a great way to manage and organize documents, and one of the many benefits of leverage SharePoint for document managements is to have a central repository for documents.  File shares are prone to duplicate documents and multiple versions of the same documents, and obviously using SharePoint will mitigate many of these concerns.  Occasionally though, it makes sense to keep a document in multiple locations – what if for whatever reason, a document belongs in Library 1 and also Library 2?  Should you just upload it to both places?  Nope!  Utilizing a built-in content type will allow you to create shortcuts that point to the original location in your document library.

To illustrate this, I’ve created an Expense Reports document library with a few entries. Granted, expense reports probably aren’t a practical example, but I couldn’t think of anything more creative :).

image


As you can see, the actual documents are stored within this library.  Next, I created a My Shortcuts document library that will be used to store documents or shortcuts to other documents.  After creating the My Shortcuts library, you must allow the management of content types by navigating to Site Settings > Advanced Settings:
 image


Next, add the Link to a Document content type to the document library:

image

 
Once you add this content type, you will be able to create a link from the New toolbar menu:

image 


Simply enter a name for the shortcut and the URL, and click OK:

image


Viola!  A link to the document!

image

 

This is a great way to keep your documents in a single place, but still be able to provide a link to it from within a completely separate library.

Posted by Aaron Varga on Monday, 5 Jan 2009 12:10

I was poking around and found a way (this may be old news, but it's new to me!) to filter a SharePoint list or library with only query string parameters.

The syntax is as follows:

< URL to List or Library >/Forms/AllItems.aspx?FilterField[X]=[Column to Filter]&FilterValue[X]=[Value]

where...

[X] is the number of filter's you're applying.  The first set will always be 1, the next set 2, etc.
[Column to Filter] is the internal name of the column you wish to filter, such as Title.
[Value] is the value you wish to filter on.

FilterFieldX and FilterValueX must always be used in pairs.  Take for example the following URL:

http://server/Blog/Lists/Posts/AllPosts.aspx?FilterField1=PostCategory&FilterValue1=SharePoint

You'll notice that the first filter field is PostCategory, and the value is SharePoint.  That will filter the list for all posts with a category of SharePoint.

If I want to further filter, I would add another set of FilterField/FilterValues:

http://server/Blog/Lists/Posts/AllPosts.aspx?FilterField1=PostCategory&FilterValue1=SharePoint&FilterField2=Title&FilterValue2=SharePoint%20Theme%20Switcher

The above URL filters for all posts with a category of SharePoint, and contain a value of SharePoint Theme Switcher.  Keep in mind this is a URL and your values will have to be encoded accordingly.

Happy filtering!