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 have a "choice" (Checkboxes (allow multiple selections) ) column and wanted to convert the column as "managed metadata" column without any data loss. Suggest.

share|improve this question

From my experience this will have to be done programmatically. Add a new managed metadata column manually then write a console app or PowerShell to loop trhough the items/documents and match the selected value with the managed metadata equivalent. Then do a SystemUpdate(false) on the item (the false part will preventing the version from being increased)

Hope this helps

share|improve this answer
Is there any script readily available? – Karthikeyan Dec 20 '12 at 5:38
up vote 0 down vote accepted

Updating the managed metadata Field -> Multivalue (allow multivalue)

○ Create a local term group, set, terms, term
○ Ref -

$site = Get-SPSite "SiteURL"
$session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$web = $site.openWeb() ;
$termStore = $session.TermStores["Enterprise Metadata Service Proxy"];
$group = $termStore.Groups["GroupName"];
$termSet = $group.TermSets["TermSet"];
$terms = $termSet.Terms;

$list = $web.Lists["ListName"];

$list.Items |% {

$spItem = $_;

write-host "Updating the Item - $($_.Id)";

#Get the taxonomy field for the list item
$taxField = [Microsoft.SharePoint.Taxonomy.TaxonomyField]$spItem.Fields["TaxField"]

#Create a term collection
$termCollection = new-object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection($taxField);

$termName = $spItem["ChoiceField"].ToString() -replace ";#",",";

foreach($indTerm in $termName.Split(","))
    if($indTerm.Length -gt 0)
    #Get each individual term.
    $term = $terms | where {$_.Name -eq $indTerm}

    #Creating a field value that represents one term
    $taxonomyFieldValue = new-object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue($taxField)
    $taxonomyFieldValue.TermGuid = $term.Id
    $taxonomyFieldValue.Label = $term.Name  

    #Add term to collection.

#Adding the Term Collection to the column.  
$taxField.SetFieldValue($spItem, $termCollection);


share|improve this answer
I think you misinterpret the question. The OP wants to convert a SPChoiceField to a SPTaxonomyField, not change an existing TaxonomyField from simple to multiple valued – Steve B Dec 20 '12 at 14:49

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.