Archive | Good2Know RSS for this section

Good2Know: Merge Terms…What does it do?

Today I played around with the SharePoint2010 managed metadata termstore and especially with the “merge terms” functionality.

What did I do:

1. I have created a termset “TestTermSet” (I know I am so creative when it comes down to names)

2.I have created Terms (Term1-Term4) within the termset

3. I have created a list “TermsTest” and added two managed metadata columns to it.

4 I have created two entries in that list (Test1 – Term2, Term3 / Tes3 – Term4)

I ran the following PowerShell to get me the IDs of the existing terms:

$taxsession = Get-SPTaxonomySession -Site http://yoururl
$termstore = $taxsession.termstores[“SharePoint – MMS”]
$testgroup =$termstore.groups[“Tests”]
$termset =$testgroup.termsets[“TestTermSet”]
foreach ($term in $termset.terms) {
   
    Write-Host $term.name “-“$term.id
}

 

The output was:

Term1 – 1280d6f8-3db8-42ec-87be-2ab9389e8d13
Term2 – c3cb39a5-5fcb-4040-90c7-005eb34b53f1
Term3 – 01bb9ed6-08e5-43dd-be03-9bbd17a45fd2
Term4 – 8fe913ef-6879-4003-b0e5-82ad9a358dfb

Then I merged (using the UI on central administration) Term1 and Term4:

After running the script again I get this result:

Term2 – c3cb39a5-5fcb-4040-90c7-005eb34b53f1
Term3 – 01bb9ed6-08e5-43dd-be03-9bbd17a45fd2
Term4 – 8fe913ef-6879-4003-b0e5-82ad9a358dfb

So Term1 disappeared, Term4 kept its ID and when you look into the UI you see that Term1 has been added as an “Label” (synonym) to Term4

image

When you now check the list with the entries made you will still find Term1 as value of one of the columns.

When you now create a new entry in your list and you enter “Term1” SharePoint will autosuggest you “Term4”.

image

So from what I can see the “Merge term” functionality just adds a new label to an term and removes the term. And as so often in SharePoint values set previous to the merge will not be updated after a merge… Interesting

Advertisements