SharePoint 2010 What’s New – Ratings #SPC09

SharePoint 2010 offers a new feature around rating content. Note that this feature is only available in SharePoint Server 2010 and not available in Windows SharePoint Services 4.0 SharePoint Foundation 2010 (yeah, I can’t keep up with the name changes either).

Ratings are very generic things that have a lot of flexibility. They allow users to rate content (of any type, Lists, Documents, Pages on a site, and even Content Types) and store that ratings data in the database just like the new social tags that are part of 2010. A rating represents the average score from all users submitting a rating for that item.

SharePoint Server provides the rating store, a control to rate items, and a web service to collect and consume the ratings. This service can be used from anywhere inside or outside of the system, including Office 2010 clients.

To enable a site for ratings you activate the Ratings Service for the site collection via Central Admin (once the service is activated it can be used on any list in the site collection). The service creates a timer job that takes care of collecting the rating data and storing it. Ratings are saved asynchronously but then the store is queued up so not everything is written directly to the database immediately. The service also creates two site columns, one for Ratings and one for the number of ratings. These are available to add to your own Content Types and are added to Lists when the Ratings setting is enabled.

To start with ratings, we need something to rate. So here’s a simple list with some movie titles in it that we’ll enable ratings on.

image

To enable ratings, we go into the settings for this list. Under General Settings for the list you’ll see a new option called Ratings settings.

image

Select this and you’ll see the option to turn ratings on or off for this list. It works the same for a Document Library.

image

Once you select Yes and click OK, magic happens! Now we take a look at the library and two new columns have been added (from the site columns the service created above). A Rating column (this is a new Content Type) and a Number column to hold the number or ratings. Each time a user clicks on a rating for each item, the number goes up. This is used to average out the rating score to produce the overall rating value for the item.

image

Now when we look at our list we see the new Rating and Counter columns added (they’re added by default to your list but you can change this in the view just like any other column).

image 

To add a rating, just hover over the Rating field. An AJAX progress window displays then a tooltip provides instructions to the user. The ratings service uses a ratings control seen here that uses two star displays. The first display shows the average rating. As you hover your mouse over the stars the colour changes to yellow to reflect the rating you’re about to assign via a mouse click.

image

Once you click on a rating a confirmation tooltip is shown. This is the second star in the ratings control and displays the current user’s personalized rating. This is all done asynchronously so there are no icky postbacks.

image

You also get the same user experience when editing a single record in the edit form.

image

Pages are rated the same way as items in a list but because you can change the page layout, you’ll need to open the Page Layout in SharePoint Designer 2010 and add the rating control wherever you want (and optionally set some options and properties for the rating). Information is stored in the same place for the ratings.

Once the list is rating-enabled, you can use the Rating column or Number of Ratings column to group or sort the information in a Content Query Web Part.

The rating service not only provides features inside of SharePoint but also exposes a Ratings Web Service that any application or Office client can consume. This allows you to submit a rating for an item, get the average rating and rating count for an item, and get the personal rating for an item. The Web Service is the same service that provides the functionality to the Ratings control so the results are the same. This allows you to provide say a ratings experience to your users inside of your own external ASP.NET application but still submit and keep track of the rating data in SharePoint.

Enjoy learning the new features of SharePoint 2010!

13 Comments

  • Cool,
    look like the ratings system my company did for MOSS

  • Hi Bil,

    In your List Settings screenshot, last option says "Form Settings"!!!

    I haven't seen this on any SP 2010 build. Please confirm, is it 2010 or custom?

    Curious...

    --Sharad

  • @eJugnoo: Nothing custom but I do have all the features turned on. I'll explore it further as I haven't ever launched it to see what it's for.

  • Thanks Bill for the hint.

    It turns out Form Settings shows up on activating Enterprise feature for the site collection. It allows you to switch on InfoPath editing of Forms for the current list (for layout, fields, validations etc). Once activated, it shows up new Button in Ribbon to open the Form in InfoPath (for editing).

    -- Sharad

  • Bil, it seems there is no way for a List Designer to control that a user should be able to submit only once or multiple times?

    -- Sharad

  • How can we implement this in Sharepoint 2007? We have to implement it in Sharepoint 2007.

  • Hello,

    I was able to create an ECT and the first three columns of data that I used to create the ECT display on the portal.

    The only issue I am running into is that I want to add more columns to the existing ECT in designer (that I created), but apparently either I have to recreate the ECT unless there is a workaround. One of the articles I found indicated it may not be possible to add columns to an existing ECT because the BCS has certain limitations and this may be one of them, but I don't know that for sure since the article was a bit vague. However, when I went to The Portal and noticed under (Lists-> Employees-> List (in the Ribbon) -> List Settings -> ‘Columns’ heading you can see the other columns that I added to the ECT, but is not displaying on the portal for 'Employees'. So, we know the ECT has been created and other columns added (that don't display for the end user to view), but it’s a matter of whether it needs to be re-created to pull the rest of the columns in the site to be viewable to the end user.



    Many thanks in advance for your assistance. :)

  • Hi there, Nice Article.
    Well I hv one question. How do I tooltip the stars, so that stars gives something meaningful information.
    Like.

    1Star-Not Interesting and Not Useful
    2Star- Something Interesting and Useful
    3Star- Interesting & userful
    etc.....

    thanks
    khushi.sshaikh@hotmail.com

  • Hi...

    What can you do if you want to add a Comment for rating.
    And is there a Rating History(User,Date/Time) for it..

  • hi,

    If i want to show all of the rated documents value along with the title of a page to the user with in a single webpart.How to achecive this.

  • How would I enable rating for pictures? I'm trying to create a rating system for employee of the month. Any help would be great.

  • Hi,
    Nice article. However, i need some help here.
    I set up the rating for my Library Books list and it works perfectly well. However, the custom view of the same list doesn't work well.

    The rating stars do not turn yellow on mouse-over and no change is observed when clicked on.

    Your assistance will be highly appreciated.

  • Hello !! could you help me realize the rating to an item of a custom list using code.. cause i created a list definition from a content type that i created and i dont find the rating settings when i check My SP Site !!

    Thank you :)

Comments have been disabled for this content.