Follow Us:
There are numerous cool new features in SharePoint 2010, and I’ve found that integrating them into custom solutions are not always straightforward. I found this to be true with ratings as well. Ratings are one of the new social tagging features that gives users a 1–5 star graphic to rate content. You can find a high level overview of social tagging features here on TechNet.
Normally this isn’t a problem. For example, you have your normal Shared Documents library, and you want users to be able to rate content. No problem right? We go into the library settings, and then click on Rating Settings. We simple click Yes, and hit ok. Too easy:
This adds two site columns to the library called:
So everything’s working and dandy. Well, what if we need ratings on a custom content type that is being deployed across the farm? Who wants to go into every library and set that by hand? There’s always PowerShell, but there’s a problem. When I use the above normal library setting on a library with a custom content type, the ratings fail to get stored. If you check the ULS logs, I saw this:
RatingSync: Unexpected exception processing <filename>. Error:Microsoft.SharePoint.SPException: Invalid number value. A number field contains invalid data. Please check the value and try again. ---> System.Runtime.InteropServices.COMException (0x8102001A): Invalid number value. A number field contains invalid data. Please check the value and try again.<nativehr>0x8102001a</nativehr><nativestack></nativestack>
Awesome. So what do we do? It’s really easy, we just need to add the rating columns to the custom content type itself. To do this, edit your custom content type (located in the site content types gallery of the root site in the site collection most likely). Click Add from existing site columns, and add the two columns named above. After doing this, I was able to set ratings without error. You HAVE to add them both or it won’t work!
Now, one last item of note on this. Ratings are not stored instantly. They work off of two timer jobs that are accessible via Central Administration on the SharePoint server:
By default, they run hourly so your ratings changes wouldn’t show for an hour. To speed this up, edit the timer job and change the schedule to some shorter minute value. Or can you run them manually on demand for testing purposes.
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.