SocialDataService

Nov 9, 2012 at 5:07 AM
Edited Nov 9, 2012 at 6:48 AM

Hi,

To get average rating for a list item, how to get url of list item. Please let me know a code sample to call the GetRatingAverageOnUrl or SetRating using spservices. It is not an item/doc of a document library but an item in a custom list.

Regards,

Sameer

Nov 15, 2012 at 5:22 AM

If I know how to write url of a list item that will be helpful. This I want to use with GetRatingAverageOnUrl/SetRatings.

-Sameer

Coordinator
Nov 17, 2012 at 4:08 AM

Sameer:

The url parameter is simply the URL to the item for which you'd like to obtain information. Have you tried anything yet?

M.

Nov 20, 2012 at 9:43 AM

Hi,

1. For a list item I tried URLs like below with GetRatingOnUrl but nothing worked.

  • http//<list path>/2_.000 // Here 2 is th id of the item
  • /_layouts/listform.aspx?PageType=4&List={B5370A4E-3686-4F60-B566-6F54FB907633}&ID=2
  • /_layouts/listform.aspx?PageType=4&List={B5370A4E-3686-4F60-B566-6F54FB907633}&ID=2&ContentTypeID=0x01009D026381C2922145BEFE40F8948D3E84
  • /_layouts/listform.aspx?PageType=4&ListID={B5370A4E-3686-4F60-B566-6F54FB907633}&ID=2&ContentTypeID=0x01009D026381C2922145BEFE40F8948D3E84
  • /_layouts/listform.aspx?PageType=4&List={B5370A4E-3686-4F60-B566-6F54FB907633}&ID=2&RootFolder=*
  • Also variants of above with DispForm.aspx and EditForm.aspx

2. For a document (example mydoc.docx) in a document library, GetRatingonUrl is working. URL is http://<document library path>/mydoc.dox. That means I atleast got URL of the document properly. Now for the same document URL if I use on GetRatingAverageOnUrl, I got soap error as you have mentioned in issue 29 Oct. http://spservices.codeplex.com/workitem/7492

I am using SPServices version 0.7.2 and jquery version 1.8.2.

-Sameer 

Coordinator
Nov 21, 2012 at 3:48 AM

Sameer:

FYI - I'm not ignoring you, but I haven't had time to look at this. If you sort it out, please post back to help others.

M.