Thursday, October 16, 2008

How to access personal views form Sharepoint Content Database

Each list or library has at least one view, based on its type and which settings have been applied. Some lists and libraries have other built-in views, and you can create custom views. For example, a task list has several views, such as just the tasks due today, just the tasks assigned to you, all tasks, and so on. You can create personal views and public views.

A personal view is available only to you when you look at a list or library. So functionally only the user who has created the Personal View can see this view. Not even the System Administration can view the personal view.

In technicial terms a view consists of the following:
View Fields – Fields that will be displayed in the View.
Query – CAML query that fetches the records from the list.
Paging – True/False
Row Limit – Number of records to be shown.

Example:
<ViewFields><FieldRef Name="Attachments"/><FieldRef Name="LinkTitle"/></ViewFields><Query/><Aggregations Value="Off"/><RowLimit Paged="TRUE">100</RowLimit>


The way that we have found out to have a look at these attributes of a view (Personal / Public) is to drill thorught the content database.

Open the WSS Content Database. There is a Table dbo.WebParts
Run this query on the table.
select tp_View from webparts
where tp_displayname like '%My View%'



where between ‘%%’ there is My View.
This is the name of the personal view I created.
Explore the table and the columns and you will get more to learn.

No comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com