SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found the GetFieldValue(string value) function but this requires that you pass it a value that serves as the identifier for the value to be retrieved (i think).

I just want to get all of the possible values for the TaxonomyField, can this be done?

share|improve this question

Yes, that can be done. You need to know the term set to which your TaxonomyField is associated. You can then read all the terms (in other words, all possible values for your taxonomy field) that belong to the term set.

Check following:

share|improve this answer

If you want to get all the possible values for a TaxonomyField, you can use a method similar to this:

  private TermCollection GetAllValuesForField(SPWeb spWeb, SPList spList, string fieldDisplayName)
        // create new TaxonomySession based on the current Site
        TaxonomySession taxonomySession = new TaxonomySession(spWeb.Site);

        // connect to the Term Store
        TermStore termStore = taxonomySession.TermStores["Term Store Name"];

        // connect to the Term Store Group
        var group = termStore.Groups["Term Group Name"];

        // get a reference to the TaxonomyField (I'm using a TaxonomyField in a SharePoint List)
        TaxonomyField taxField = spList.Fields[fieldDisplayName] as TaxonomyField;

        // get the term set based on the ID (from the taxonomy field)
        var termSet = group.TermSets[taxField.TermSetId];

        return termSet.GetAllTerms();
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.