HowTo: Map a source metadata field to a target SharePoint List field or taxonomy hierarchy field or Choice List field
There can be a requirement to map a source metadata field to a target SharePoint List field or taxonomy hierarchy field. The target SharePoint List or taxonomy could have different field values or hierarchical metadata in SharePoint or Office365 as compared to source system values of the respective fields.
So, to map and transform such metadata fields to new List or taxonomy values in SharePoint, we have to configure CSV-based metadata mapping, which uses PowerShell extensions and function mapping features in Migration Accelerator.
Please refer to the following step-by-step guide:
- Taxonomy/Managed Metadata Mapping Sample CSV. Please note that hierarchical taxonomy values should be separated with Semicolon(;) as shown in below Sample CSV.
- Taxonomy/Managed Metadata Mapping Sample CSV
- SharePoint List Metadata Mapping Sample CSV
- SharePoint Choice List Metadata Mapping Sample CSV. Please note that multiple choice values should be separated with SemicolonHash(;#) as shown in the following Sample CSV.
- Taxonomy/Managed Metadata Mapping Sample CSV
- Close the Migration Accelerator Instance if it’s running.
- Locate Proventeq Migration Accelerator PowerShell Default Module file as shown below:
- Open above PowerShell Default Module file and add the PowerShell command provided below to load the above Metadata Mapping CSV into a global PowerShell object and then save the file.
$global:CSVCommunicationCategoryMetadata = Import-PVQCsvAsHashTable 'D:\proventeq\metadata\Communication Category.csv' 'SourceValue' - Then launch the Migration Accelerator application in order to map the respective metadata field.
- Select Migration Task Settings and open Content Type mapping for respective field metadata mapping as shown below:
- Select the respective field setting icon and then select mapping type as Function, as shown below:
- Click on the Select button to launch a function mapping popup as shown below. Creating a function mapping type will allow you to reuse this mapping function in other Content Type mappings as well.
- Add a new function by providing the following parameters:
- Provide the Name of the function
- Provide the Description of the function
- Add the parameter “SourceValue” by clicking on ‘+’ button. Provide the Data Type as ‘string’ or ‘integer’.
- Provide PowerShell script to read a source field value and return it’s matching target value from the global PowerShell CSV object as shown below:
$meta = Get-PVQMetadataRow $SourceValue $global:CSVCommunicationCategoryMetadata
if($meta -eq $null)
{
throw “Matching communication category metadata not found”;
}
else
{
return $meta.TargetValue;
}
- Click on Save Function and then select the newly-created mapping function.
- After creating and selecting a new function, you need to provide the necessary parameter(s) in the “List of parameters available for the function” section as shown below i.e. Select mapping type as Metadata and then select the respective Source field.
- Click on Save button to complete the metadata mapping for this field as shown below:
Note: Multiple Taxonomy Metadata Mapping is not supported using CSV in Office 365 when the package processing setting is enabled for 6.4 Release. |
Comments