1

I have a dropdownlist which I populate with the names and IDs of a bunch of terms from my term store. When I then select a term in the dropdownlist an autopostback happens.

When this postback happens I want to query a list and get all items that has the selected term in it's managed metadata column.

The Value in the list items are Guid thus I can't use the CAML In clause to query it.

How can I get all the items with the selected term using the TermGuid?

1

I think this article should help you: http://msdn.microsoft.com/en-us/library/office/ff625182(v=office.14).aspx

It says: By passing true to the bool includeDescendants parameter to TaxonomyField.GetWssIdsOfKeywordTerm, you get the lookup IDs for the term with the specified GUID, and you get the IDs for all its child terms.

Once you get ID you can query the list.(Example given in the link).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy