Wednesday 23 March 2016

Search a Taxonomy term in a TermSet using JSOM

Here is some code I put together to search a term within a term set. This is for scenarios when you have a large term set and need to efficiently find a term with a specific label.

Here is a link which describes the exact combinations needed to make this work (Thanks Jose!)
https://msdn.microsoft.com/en-us/library/hh626704%28v=office.12%29.aspx

In this code, I am searching for all terms which start with an "A" in a term set which contains locations from around the world:

Note: I am using JSOM here but this also works with CSOM



Result:


2 comments:

Anonymous said...

great doing. and i happy to visit your blog to know about this wonderful information. thanks for sharing. keep updating.

quintorel said...

Good post Vard!

One sitenote about posible combinations of parameters using LabelMatchInformation:
https://msdn.microsoft.com/en-us/library/hh626704%28v=office.12%29.aspx

Cheers!