All About SharePoint 2010/2013

  Home  |   Contact  |   Syndication    |   Login
  23 Posts | 0 Stories | 0 Trackbacks


Exploring SharePoint 2013 Online

Developing Nintex Workflows

Exploring SharePoint 2013

Acquired MCPD : SharePoint 2010 Developer

Share on Facebook


Post Categories

Thursday, December 2, 2010 #

I got a question in MSDN forum that how to add a SharePoint document property in respective document's footer and it should be available to all new documents. It's really interesting and started R&D on this. Lets see how to insert document property in header/footer.

How to use SharePoint document property inside Document's Header/Footer?
Here the steps on creating document library and update the document template.

  1. First I'll create a Document Library named "Docs". If you already have document library then skip this step.
    New Document Library

  2. Lets create 2 more new columns(Phase, Level) which are document properties (Open Document Library -> Library Tools (Tab) -> Library (Tab) -> Create Column. Phase is choice field with some choice items and Level is Single line of Text.

  3. Open Document Library -> Library Tools (Tab) -> Library (Tab) -> Library Settings.

  4. Under General Settings -> Advanced Settings. Under Document Template Section select "(Edit Template)" link. (If you want to use same template for different libraries then save the document in site assets or central library and provide the path here.) It'll open new empty document in Microsoft Word.
    Document Template

  5. In Microsoft Word Click "Insert" tab -> Header. Select a header design as required. Remove elements in Header which are not required. Place the cursor on Header area and select "Insert" tab -> Quick Parts in Text Section -> Document Property -> Phase. Here it'll list all document properties including fields available in the same SharePoint library. Same way insert "Level" Property too.
    Edit Document Template

    After inserting all the proerties, document is ready to go back to SharePoint.

    Document Template after adding Properties

  6. Save the document and exit from MS Word. Return to the SharePoint library settings Window and click "Ok" to save the changes.

  7. Now the library is ready with required template. Open the Document library -> Library Tools (Tab) -> Documents (Tab) -> New Document -> New Document. It'll show warning and just click Ok. Microsoft Word will be opened with the specified template.
    New Document based on Template

    Add content and just save with proper name. That's it!

Rating is a new feature introduced in SharePoint 2010 that can be added to any SharePoint List/Library. It helps users to evaluate and authors to get feedback. In SharePoint 2007, we have write code and deploy it as feature for rating.

How to enable Rating in SharePoint 2010?
It's very straight forward to enable rating in SharePoint 2010 lists.

  1. First let's create a Custom list named "Search Engines". If you already have list/library then you can skip this.
    New Custom List

  2. Once created, open the list select "List Tools" Tab -> List Tab -> List Settings.
  3. Under General Settings select "Rating Settings".
    Rating Settings

  4. Under Rating Settings section select "Yes" for "Allow items in this list to be rated?"
    Rating Settings

  5. Now a new field "Rating (0-5)" is added to the list. But the actual field name is "AverageRating". 
  6. Add some items in the list.

  7. When move mouse over the Rating field it'll show message to add rating. You can select the rating as required.

The same way, rating can be enabled on document libraries. Once rating given to an item then it'll be stored in database. Every user can provide their own rating and average will be displayed when viewing the list. There is a specific service("User Profile Service Application – Social Rating Synchronization Job") running behind to calculate the average of ratings.

User Profile Service Application – Social Rating Synchronization Job

This job executes every 1 hour by default. If required can be executed manualy by "Central Administration -> Monitoring -> Timer Jobs -> Review Job Definitions -> User Profile Service Application – Social Rating Synchronization Job -> Run Now" or change the "Recurring Schedule" as required.

User Profile Service Application – Social Rating Synchronization Job

Once the Synchronization job executed then users can see the average ratings (Blue Stars).
Before Synchronization Job execution.

List before synchronization

After Synchronization Job execution.

List After Synchronization

Move mouse over blue star ratings to know your Rating (only if you have already given rating).

Note: If a user giving rating which he already given, then his previous rating will be discarded and new selection only getting considered.