TaxonomyClientService.GetTermsByLabel Method
SharePoint 2010
Gets Term objects that match the search label.
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.
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);
string termSetIds = "<termSetId>aa54497e-f242-450b-a832-f75a0effbbd5</termSetId>";
client.GetTermsByLabelAsync(autoCompleteBox1.Text, 1033, TaxonomyService.StringMatchOption.StartsWith, 1, termSetIds, false);
- 7/19/2010
- petkarus