Show “Ratings” field in DVWP to a “Read” Permissions Audience

I recently created a filtered webpart page with a number of data view web parts (DVWP), that showed the Ratings field.  I wanted to show Ratings with the default star layout that shows natively in library and list views.  When attempting to view the resulting page with Read privileges, the page threw a permissions error although I had read permissions to all lists and libraries underlying my DVWPs.

After validating correct permission settings for my libraries and lists as well as for the webpart pages and styles libraries, I narrowed the problem down to the “Ratings” field.

Filtered Webpart Page with DVWPs showing Ratings

Filtered Webpart Page with DVWPs showing Ratings

To render the “Ratings” field to the DVWP, I had changed the field format to List Form Field.  This appeared to be the only way to show the stars.  (see image below)

SharePoint Designer "Ratings" Field DVWP - show as "Stars"

SharePoint Designer “Ratings” Field DVWP – show as “Stars”

Here is the resulting code:

Ratings field code - List Form Field

Ratings field code – List Form Field

Unfortunately, showing the Stars in this way caused the page to be inaccessible because list form fields require contribute privileges.  To change this to a display field, I deleted the =”Edit” after controlmode (highlighted in code above) to =”Display”.

Controlmode Intellisense Selector

Controlmode Intellisense Selector

This allows users with Read permissions to view the page and still allows them to rate content.

Advertisements

About Inge Rush

I love using SharePoint to create business solutions. I am not a SharePoint administrator or .net developer (although I dabble a bit). I just learn on-the-job as I solve problems.
This entry was posted in SharePoint 2010 and tagged , . Bookmark the permalink.

One Response to Show “Ratings” field in DVWP to a “Read” Permissions Audience

  1. Christel says:

    Oh my gosh – you solved my problem exactly. Thank you so much for writing this blog post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s