This document provides an overview of managed metadata in SharePoint. It discusses understanding managed metadata, configuring term sets, and working with managed metadata fields. Key points include how managed metadata encourages consistent tagging, the managed metadata service application, building term sets using the server-side object model, and reading/writing single-value and multiple-value managed metadata fields. The document also references demonstrations for creating managed metadata fields and managing term sets using JavaScript.
3. Agenda
Understanding Managed Metadata
Configuring Managed Metadata Term Sets
Working with Managed Metadata Fields
4. Agenda
Understanding Managed Metadata
Configuring Managed Metadata Term Sets
Working with Managed Metadata Fields
5. Understanding Managed Metadata
Overview of Managed Metadata
The Managed Metadata Service Application
Term Store Hierarchy
Understanding Terms
6. Overview of Managed Metadata
Managed metadata encourages users to tag
content with a consistent set of terms and
keywords
Terms
Keywords
Hashtags
Using Managed Metadata Fields
Managed Metadata in Other SharePoint Services
(important!)
7. The Managed Metadata Service Application
The Managed Metadata Service Application
Configuring the Service Application:
Starting the Managed Metadata Web Service
Creating the Service Application
$serviceAppPool = Get-SPServiceApplicationPool "SharepointServicesPool"
$metaDataServiceApp = New-SPMetadataServiceApplication Name "Managed
Metadata Service Application" ApplicationPool $serviceAppPool DatabaseServer
"LONDON" DatabaseName "MetadataServiceDB"
New-SPMetadataServiceApplicationProxy Name "Managed Metadata Service
Application Proxy" ServiceApplication $metaDataServiceApp DefaultProxyGroup
8. Term Store Hierarchy
Term Stores
Term store administrators
The Term Store Management Tool
Groups
Group Managers
Group Contributors
Term Sets
Term Set Owners
Term Set Contacts
Term Set Stakeholders
9. Understanding Terms
Labels
Synonyms
Abbreviations
Languages
Copying, Reusing and Pinning Terms
Copied terms are independent of the source term
Re-used terms are single terms that appear in multiple
locations
Pinned terms are re-used terms that can only be edited
in one location
Custom Properties
Availability and Deprecation
11. Configuring Managed Metadata Term Sets
Obtaining Taxonomy Sessions and Term Stores
Creating Groups and Term Sets
Creating Terms
Demonstration: Building a Term Set with the
Server-Side Object Model
Using Terms
Managing Permissions and Stakeholders
Demonstration: SharePoint hosted app to manage
metadata objects such as groups and term sets, by
using the JavaScript CSOM
12. Obtaining Taxonomy Sessions and Term Stores
Opening a Taxonomy Session
Opening a Term Store
TaxonomySession taxonomySession =
new TaxonomySession(siteCollection);
TermStore termStore =
taxonomySession.TermStores[
"Managed Metadata Service Application Proxy"];
13. Creating Groups and Term Sets
Working with Groups
Working with Term Sets
vehiclesGroup = termStore.CreateGroup("Vehicles",
groupGUID);
termStore.CommitAll();
carsTermSet = vehiclesGroup.CreateTermSet("Cars",
termSetGUID);
termStore.CommitAll();
14. Creating Terms
Creating New Terms
Guid newTermGUID =
new Guid("02639124-4dfa-4174-89d2-4f506f3a5d55");
termSet.CreateTerm("Mini Van", 1033, newTermGUID);
termStore.CommitAll();
15. Demo: Building a Term Set with the Server-Side
Object Model
In this demonstration, you will see how to:
Add references to a console application to work
with SharePoint managed metadata.
Connect to a taxonomy session and open a term
store.
Obtain or create a new group in a term store.
Obtain or create a new term set in a group.
Create a new term and commit changes to the
term set.
16. Using Terms
Creating Labels
Reusing Terms
Reusing Terms with Pinning
Label newLabel = miniVanTerm.CreateLabel("Camper Van",
cultureID, false);
Term reusedTerm =
destinationTerm.ReuseTerm (sourceTerm);
Term reusedTerm =
destinationTerm.ReuseTermWithPinning (sourceTerm);
17. Managing Permissions and Stakeholders
The TaxonomyRights Enumeration
Checking Permissions
Adding Contributors and Managers to Groups
Adding Stakeholders to TermSets
group.DoesUserHavePermissions(TaxonomyRights.Contributor)
group.AddContributor("CONTOSOMelissaK");
group.AddGroupManager("CONTOSOBartD");
18. Demo: JavaScript CSOM
Creating and Configuring the Corporate Structure
App
Displaying the Existing Taxonomy Groups
Creating a Group, a Term Set, and Terms
20. Working with Managed Metadata Fields
Creating Managed Metadata Fields
Single-Value Fields
Multiple Value Fields
21. Creating Managed Metadata Fields
Creating a Managed Metadata Field
Creating a Connected Hidden Note Field
Connecting a Managed Metadata Field to a Term
Set
Demonstration: Create MMD fields
22. Single-Value Fields
Reading Single-Valued Taxonomy Fields
Get the item
Cast the field value as a TaxonomyFieldValue
Use the Label and TermGuid properties
Setting Single-Valued Taxonomy Fields
Get the field and the item
Cast the field and a TaxonomyField
Create a new TaxonomyFieldValue and set its
properties to match a term.
Call the SetFieldValueByValue() method.
Update the item.
23. Multiple Value Fields
Reading Multi-Valued Taxonomy Fields
Get the item
Cast the field value as a TaxonomyFieldValueCollection
Loop through the collection
Setting Multi-Valued Taxonomy Fields
Get the item
Cast the field as a TaxonomyField
Concatenate a string of term labels and GUIDs
Pass the string to the TaxonomyFieldValueCollection
constructor
Call the SetFieldValueByValueCollection()method
Update the item.