jQuery Library for SharePoint Web Services (SPServices) v0.6.0 Released

Last night (March 12), I released SPServices v0.6.0. As I’ve been discussing in previous posts (here, here, and here), this release is a significant refactoring so that it passes the majority of the coding standards tests at JSLint.com. Of course, there are some other great things included in this release as well, and I’ll outline them here. If you’d like to see the full complement of changes, check out the Issue Tracker here. With this release, I’ve tried to use the Issue Tracker better so that the tasks document the changes better.

I’ve updated the docs to replect all of the changes, but let me know if it seems that I’ve missed anything.

Thanks to everyone who has contributed ideas, assisted with testing, etc. for this release. A special thanks to Anita Boerboom (@anitaboerboom) for her help in testing the beta for the release. as well as all of her support for SPServices in general!


  • Refactored the code to pass the tests in JSLint. This refactoring should both improve reliability (though there weren’t real issues) as well as improve the execution speed.
  • v0.6.0 is now compatible with jQuery 1.5, which previous versions are not. If you want to use jQuery 1.5+, you must upgrade to v0.6.0.
  • I’ve made several efficiency changes which reduce the number of Web Services calls in certain instances in the value-added functions across the board.
  • Several bug fixes and function abstractions which are used by multiple “value-added” functions. These changes improve reliability and speed.



  • Fixed to work with a German language-based site. See my article at SharePoint Magazine for insight on why this needed to happen.
  • Fix for cascaded multi-select columns.


  • Fixed to handle multi-value Lookup columns.
  • Added a Source Query String parameter for Lookup and LookupMulti column links so that the user is returned to the original form after clicking on them


  • In 2010, the submit button for a form has the value=”Save” rather than “OK” and I now handle this. Note that people are using this function in 2010 even though uniqueness checking is built in, because SPRequireUnique gives more options, specifically to check before the postback.
  • Added a new option to show the duplicate entries as links so that one can easily research what they are and potentially clean them up.
   showDupes: false, // If true, show links to the duplicate item(s) after the error message


  • Made some significant changes to the code and output based on feedback.
  • A few bug fixes.


  • Rewrote large parts of the function to better manage the changes required in the DOM. The processing indicator icon will now show as a background image inside the input element.
  • processingIndicator has been deprecated.
  • Added several new options to the function for more flexibility.
  CAMLQueryOptions: "", // [Optional] For power users, allows specifying the CAMLQueryOptions for the GetListItems call
  filterType: "BeginsWith", // Type of filtering: [BeginsWith, Contains]
  highlightClass: "", // If a class is supplied, highlight the matched characters in the values by applying that class to a wrapping span
  uniqueVals: false, // If set to true, the function only adds unique values to the list (no duplicates)

jQuery Library for SharePoint Web Services (SPServices) v0.5.8 Released

Earlier today I released SPServices v0.5.8. The headlines for this release are: more operations, including the first SharePoint 2010 (SP2010) only operation, and a new function, SPUpdateMultipleListItems.


The Social Data Service Web Service is the first SP2010-only Web Service I’ve added to SPServices. This Web Service allows you to interact with the new social capabilities in SP2010, including tags, comments, and ratings. SPservices v0.5.8 includes all 36 operations available in the Web Service.


When you want to update multiple items in a list, there’s no “one-step” way to do it. It requires a call to GetListItems to find the specific items you want to update, usually based on some common criteria such as status or parent item connection, and then a separate call to UpdateListItems to actually make the changes. In the cases where you’d like to apply the same change to a set of items, until now you’ve had to build those two calls together yourself. SPUpdateMultipleListItems provides a generalized way to do this without having do do as much work.

Other New Operations

SPServices v0.5.8 also includes some additional operations which I missed in my first pass through the Webs Web Service and the Users and Groups Web Service. I haven’t always “wrapped” everry single operation, but only the ones which interested me, seemed like they would be interesting to others, or the ones which people have requested. The additions in v0.5.8 plug some of those holes.

Bug Fixes

There are a couple of bug fixes in this release, as usual. I was trying to use SPArrangeChoices with a Survey the other day and realized that I had never tested that situation and that the function didn’t actually work in that instance. It does now! I also fixed a small omission with GetRoleInfo which prevented it from working. There were a few other small tweaks which are recored in the Issue Tracker but which aren’t worth mentioning here.


I want to thank Mark Rackley (@mrackley), Jim Bob Howard (@jbhoward), and Matt Bramer (@iOnline247) for their help with the additional Webs Web Service operations, the idea and sample code for SPUpdateMultipleListItems, and the UserGroup Web Service Remove Role operation, respectively.

Release Notes

As always, here are the release notes, captured for posterity.

New Functionality

Alpha Issue Tracker Item Function Operation Description
ALPHA6 7573 $().SPServices.SPUpdateMultipleListItems NA UpdateListItems and CAMLQuery -> New SPUpdateMultipleListItems Function

New Operations

Alpha Web Service Operation Options MSDN Documentation Issue Tracker Item
ALPHA1 SocialDataService GetAllTagUrls termID SocialDataService.GetAllTagUrls Method 7492
ALPHA1 SocialDataService GetRatingAverageOnUrl url SocialDataService.GetRatingAverageOnUrl Method 7492

ALPHA2 – Many more SocialDataService operations. See the SocialDataService Web Service page.
ALPHA5 – The remainder of the SocialDataService operations. See the SocialDataService Web Service page.
(There’s a character limit in the release notes on Codeplex, so I couldn’t show everything.)

ALPHA3 Webs GetColumns NA Webs.GetColumns Method NA
ALPHA3 Webs GetContentType contentTypeId Webs.GetContentType Method NA
ALPHA3 Webs GetContentTypes NA Webs.GetContentType Method NA
ALPHA3 Webs GetCustomizedPageStatus fileUrl Webs.GetCustomizedPageStatus Method NA
ALPHA3 Webs CreateContentType displayName, parentType, newFields, contentTypeProperties Webs.CreateContentType Method NA
ALPHA4 Webs UpdateColumns newFields, updateFields, deleteFields Webs.UpdateColumns Method NA
ALPHA5 Webs UpdateContentType contentTypeId, contentTypeProperties, newFields, updateFields, deleteFields Webs.UpdateContentType Method NA
ALPHA6 UserGroup RemoveRole roleName Webs.RemoveRole Method NA

Bug Fixes and Efficiency

Alpha Issue Tracker Item Function Operation Description
ALPHA4 7527 $().SPServices GetRoleInfo GetRoleInfo Missing from WSops
ALPHA6 7583 ().SPServices.SPArrangeChoices NA SPArrangeChoices Doesn’t Work with Survey Questions

Editing Complex Files in SharePoint Designer Quickly

There are times when I’ve built up a page with complex Data View Web Parts (DVWPs) which take a *really* long time to load in SharePoint Designer 2007. The usual reason for this is that I’m using a Web Service as a DataSource which returns a large amount of data or that I’ve got many DataSources in an AggregateDataSource.

In the former case, setting the Show with sample data option usually doesn’t help, as you don’t always have the option to limit the returned data. This option can be a real timesaver in many cases, however.

In the latter case, it’s simply that SharePoint Designer has a *much* slower rendering engine than your browser does (at least that’s what I think it is).

There’s a trick for this when you need to make quick edits. You can right click on the file name and choose Open With > SharePoint Designer (Open as Text). Depending on what other programs you have installed on your machine and how you have things configured, you may see other options as well, like Notepad or Visual Studio.

By opening the .aspx page as text, SharePoint Designer doesn’t try to do any interpretation of the page whatsoever. This means that you can almost immediately make your edits, but you get none of the usual Intellisense, syntax help, unescaping, or color coding. So it’s great for quick edits or making changes where you really know what you are doing, but it’s hardly where you want to spend all of your time.

By the way, the exact same technique works in SharePoint Designer 2010, though I haven’t needed to use it much yet. I don’t know if I’ll run into the same slow page stuff there or not. One would hope that the rendering engine there is better, though since Microsoft doesn’t  look at SharePoint Designer as a real IDE, they may not have made that sort of improvement.  I’ll let you know what I find as I do more SharePoint 2010 work!

jQuery Library for SharePoint Web Services (SPServices) v0.5.7 Released

Tonight I’ve released SPServices v0.5.7. I can’t believe that I released v0.5.6 all the way back in June. It’s not that I’ve lost interest in SPServices, quite the contrary. Even more people have been using it (over 3800 downloads), and as I’ve said before, I know that its in use in some of the largest companies in the world. It’s very gratifying. The flip side of that is that lots more people ping me with questions and support needs. I try to get back to everyone as fast as I can and it take a lot of time. Thank goodness for my pal Mike Greene (@webdes03), who helps out when he can in the Discussions!

Well, enough about all of that. What’s in this release, you ask? Well, nothing earth shattering, frankly. It’s for a large part a maintenance release, though there are a few new goodies for you.

There’s one new function available. The $().SPServices.SPListNameFromUrl function is one which I built a long time ago to use internally to the library, but based on some questions from a few people over the last few months, I decided to promote it to a full-fledged function. It simply lets you get the list name based on the URL of the current page. I’ve used it inside many of the other functions since almost the beginning of the library. It parses apart the current URL, calls the GetListCollection operation of the Lists Web Service, and matches the URL base to get the list’s name. It would seem unneccessary, but I’ve found it to be a highly reliable and useful function to use in working with list forms.

By request, I’ve added four new operations to the library from the SiteData and Users and Groups Web Services. This is the first operation I’ve built into SPServices from SiteData, as I’ve always felt that the SiteData operations were a bit redundant and dated compared to the newer Web Services. However, back in July alexuni asked me to add EnumerateFolder, and there didn’t seem to be any analogous functionality already in the library. So voila. It’s been there in the alphas, but sorry it’s taken me to long to really release it, alexuni.  I had requests from a couple of other people to wrap the three new operations from Users and Groups: AddUserToGroup, AddUserToRole, and RemoveUserFromGroup. These three operations ought to make it easier to manage what users are in groups outside using the normal SharePoint UI to do it in Site Settings.

Finally, efficiencies and bug fixes. The bugs were all pretty much edge conditions, but still important to fix.  There were also some things I spotted in my earlier code where there were multiple Web Services calls being made where just one would do.  If you upgrade to this version, you should see some small performance improvements, depending on which functions you are using.  See the items in the Issue Tracker (listed below) if you’d like details.

Happy scripting!

As always, here’s a copy of the release notes from the Codeplex site.

Release Notes

New Functionality

Alpha Issue Tracker Item Function Operation Description
ALPHA6 7313 $().SPServices.SPListNameFromUrl NA Expose listNameFromUrl publicly as SPListNameFromUrl

New Operations

Alpha Web Service Operation Options MSDN Documentation Issue Tracker Item
ALPHA1 SiteData EnumerateFolder strFolderUrl SiteData.EnumerateFolder Method 6669
ALPHA4 Users and Groups AddUserToGroup groupName, userName, userLoginName, userEmail, userNotes UserGroup.AddUserToGroup Method 6751
ALPHA4 Users and Groups AddUserToRole roleName, userName, userLoginName, userEmail, userNotes UserGroup.AddUserToRole Method 6751
ALPHA5 Users and Groups RemoveUserFromGroup groupName, userLoginName UserGroup.RemoveUserFromGroup Method 6751

Bug Fixes and Efficiency

Alpha Issue Tracker Item Function Operation Description
ALPHA1 6598 $().SPServices.SPGetQueryString NA $().SPServices.SPGetQueryString() fails if query parameter has no value
ALPHA2 6688 $().SPServices.SPCascadeDropdowns NA SPCascadeDropdowns with custom forms where the page is not in the list’s context
ALPHA3 6702 $().SPServices.SPRedirectWithID NA SPRedirectWithID – Chaining NewForms won’t work
ALPHA5 6727 $().SPServices.SPGetLastItemId NA Getting User Information w/ SPGetLastItemId
ALPHA5 7326 $().SPServices.SPArrangeChoices NA optimization for SPArrangeChoices
ALPHA6 7329 $().SPServices.SPListNameFromUrl NA Some bugs with listNameFromUrl() [Now: [$().SPServices.SPListNameFromUrl]
ALPHA6 7331 $().SPServices.SPRequireUnique NA SPRequireUnique Calls listNameFromUrl() Twice
ALPHA6 7332 $().SPServices.SPListNameFromUrl NA SPListNameFromUrl Unneccessarily Stays in Loop
 Reviews for this release