Clean up the mess made in SharePoint by your users. Do It Now
by Simon De Baene
Simon De Baene

Convert Lookup Values to Managed Metadata Terms

Introduction

This article is one of many that will be posted every week. It presents different scenarios supported by Sharegate. For this first article, I will show you how to convert Lookup values to Managed Metadata Terms you copy content from SharePoint 2007 to SharePoint 2010.

Case

Let's say that you have a list in SharePoint 2007 with a Lookup column. You also have the same list in SharePoint 2010 with a Managed Metadata column instead. When you copy content from SharePoint 2007 to SharePoint 2010, you want to convert the different Lookup values to their corresponding Terms within the TermStore.

In this article we'll be using the Copy SharePoint items tool, but it works the same way with the Copy SharePoint documents tool.

Source list (2007)

SP 2007 Columns available

SP 2007 Lookup values available

Destination list (2010):

SP 2010 Columns available

SP 2010 TermStore

You'll notice that I've intentionally ignored the 'Value 4' in the TermStore, so I can demonstrate a conversion error (see later in this article).

Step #1 - Change the property mappings

In SharePoint 2007, the Lookup column name is 'Lookup'. In SharePoint 2010, the Managed Metadata column name is 'ManagedMetadata'. Before copying the items, both columns must be mapped together using the property mappings window and that's really powerful since Sharegate doesn't really care if the column types are different. In our case, we map a Lookup column with a Managed Metadata column. They have different names and types.

Property Mappings

Step #2 - Create a property template and start the migration

We must drag & drop the items to copy content from SharePoint 2007 to SharePoint 2010. Then, we must create a property template that will be applied to the selected item. We can see that the column 'ManagedMetadata' is mapped to the column named  'Lookup'. This is due to the property mappings we did in the previous step. For this column, we must set the default option 'Keep original value'.

We save the template and click on it (or click on Save & Copy from the template itself)

Property Template

Result:

The selected item from SharePoint 2007 is copied to SharePoint 2010. We can see that the terms were set correctly in the Managed Metadata column. It's that simple.

Successful Migration from 2007 to 2010


But what if a lookup value has no corresponding term in the TermStore?


If you have an item at the source that used the lookup value 'Value 4' but there is no corresponding Term in the TermStore, Sharegate will throw an error and will let you adjust the value during the copy operation.

Convert error during migration

Convert error message during migration


Conclusion

This subtle behavior enables powerful scenarios when migrating from SharePoint 2007 to SharePoint 2010. In this example, we convert a Lookup column, but it could also be a Choice column or any other column type. This feature allows you to change your information architecture drastically without having to hack anything to fit your migrated content. They are many behaviors like this one that we'll explore in the next weeks. You'll quickly realize how powerful Sharegate is.

by Simon De Baene
Simon De Baene
‚Äč
10 reasons why
your SharePoint migration failed
by Benjamin Niaulin  Microsoft MPV
No thanks, hide this forever.