This topic has not yet been rated - Rate this topic

TaxonomyClientService.GetTermsByLabel Method

SharePoint 2010

Gets Term objects that match the search label.

Namespace:  Microsoft.SharePoint.Taxonomy.WebServices
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
[WebMethodAttribute]
public string GetTermsByLabel(
	string label,
	int lcid,
	StringMatchOption matchOption,
	int resultCollectionSize,
	string termIds,
	bool addIfNotFound
)

Parameters

label
Type: System.String
Text upon which to match Terms.
lcid
Type: System.Int32
LCID of language to make matches against.
matchOption
Type: Microsoft.SharePoint.Taxonomy.StringMatchOption
StartsWith or ExactMatch to specify what type of matching is to be used.
resultCollectionSize
Type: System.Int32
Maximum number of Term objects to be returned.
termIds
Type: System.String
addIfNotFound
Type: System.Boolean
If matchOption is ExactMatch and no match is found and this flag is set to true, a new Term will be added to the TermStore object.

Return Value

Type: System.String
Terms which match the specified label.

The serialization of the result as well as parameters is fully described in the protocol document MS-EMMWS.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
termSetIds proper use
You need wrap termSetIds into <termSetId></termSetId> before passing in:

string termSetIds = "<termSetId>aa54497e-f242-450b-a832-f75a0effbbd5</termSetId>";

client.GetTermsByLabelAsync(autoCompleteBox1.Text, 1033, TaxonomyService.StringMatchOption.StartsWith, 1, termSetIds, false);