This project has moved. For the latest updates, please go here.

Using the TaxonomyClientService

Oct 6, 2011 at 12:33 AM

Venturing outside the safe confines of GetListItems, I'm finding no examples of how to get content from the Term Store using SPServices. So, it's "westward ho." I need to get the content of a Term from a SP2010 Term Set where its Label is equal to a Term in a list. I think it's supposed to work like this:

	operation: 'GetTermsByLabel',
	label: '',
	lcid: '', 
	matchOption: '', 
	resultCollectionSize: '', 
	termIds: '', 
	addIfNotFoundsspId: '',
	completefunc: function () {
		var something = "";
      	.... do something with html here;

If so, I should be able to set the value of the "label" with a variable, but I'm sketchy about how to report that single Term that results in a variable or alert. It's supposed to be a string too, rather than serialized XML, so I'm not sure what to expect.

An alternative is perhaps is:

	operation: 'GetChildTermsInTermSet',
	sspId: '',
	lcid: '', 
	termSetId: '',
	completefunc: function (xData, Status) {
		$(xData.responseXML).find("[nodeName='z:row']").each(function() {
			var something = "";
      		.... do something with the html here;

... where I should get a serialized XML list of matching items. The rub here is getting the SSPID for the Term Set - normally easy to get with Sharepoint Manager, but more difficult to get I think without Server Admin permissions. If I do get the XML, I can probably figure out how to use jQuery to get the variables.

Oct 14, 2011 at 1:49 AM


Sorry, b ut I don't have any good examples, either. I did some quick testing when I added the Web Service, but I can't seem to find any of it. was the kind soul who wrapped those operations for SPServices, so you might try pinging him to see what guidance he may be able to give you.