About this article
This article will explain what the Custom XML Value, Managed Metadata, and DateTime Value are and provide examples of how they can be utilized with the binding syntax in smart templates.
- What are Custom XML Value, Managed Metadata, and DateTime Value?
- How to set Custom XML Value, Managed Metadata, and DateTime Values in a smart template
- Custom XML Value example
- Managed Metadata example
- DateTime Value Example
- Dynamics metadata in PowerPoint
Prerequisites
|
What are Custom XML Value, Managed Metadata, and DateTime Value properties?
Custom XML Value, Managed Metadata, and DateTime Value are data that sit on top of the document, they are also known as metadata. Custom XML Value, Managed Metadata, and DateTime Value are often used for archiving purposes in Document Management Systems (DMS) such as SharePoint. These values can be set statically using plain text or dynamically using the binding syntax.
-
Custom XML Value
: should always be used, unless the column in SharePoint is of type "Managed Metadata" (term sets) or "Date and Time". -
Custom XML Managed Metadata
: should be used only when the column in SharePoint is of type "Managed Metadata" (term sets). -
Custom XML DateTime Value
: should be used only when the column in SharePoint is of type "Date and Time".
|
How to set a Custom XML Value, Managed Metadata, and DateTime Value in a smart template
When building the template settings and properties, the Custom XML Value
/ Managed Metadata
/ DateTime Value
can be utilized to set the metadata for the smart template. Setting the properties can be achieved by following these steps:
- In the Template Designer, navigate to the
Advanced
tab - Click
Add property
- Select
Custom XML Value
/Managed Metadata
/DateTime Value
in theType
dropdown-
Custom XML Value
set theBinding
, theNamespace
, and thePath
-
Managed Metadata
set theNamespace
, thePath
, theTerm Id
, and theTerm Name
-
DateTime Value
set the theBinding
, theNamespace
, and thePath
-
- Optionally, set an additional option to the property
Disable updates
: Disallow the setting from being updated after its generation when edited by the user through the document content updater. This option will not be visible if the document content updater is not enabled on the smart template.
- Click
Add to document
- The
Custom XML Value
/Managed Metadata
/DateTime Value
will be added to the smart template
- The
|
Custom XML Value example
Configure a Word template and save the metadata to SharePoint.
- Create a document in SharePoint (or upload a document):
- Close the document.
- Select the saved document and open the details pane. Add random values to all columns you would like to use. Do not leave them blank:
|
- Download and open the document in Word
- Open the Template Designer and click
Create Template
to activate Dynamics and document content updater on the document - Navigate to the
Form
tab and create the following text questions: "Title", "OrderID", "Description" and "Category"
|
- Navigate to the
Advanced
tab, clickAdd property
, and selectCustom XML Value
- On the Developer tab select
XML Mapping Pane
. In the fieldCustom XML Part
selecthttp://schemas.microsoft.com/office/2006/metadata/properties
.
When you select this namespace, an element namedproperties
with a child element nameddocumentManagement
appears. ExpanddocumentManagement
to show all available fields (column names) from SharePoint:
|
Note that the column Order ID
from SharePoint is shown as Custom XML Part Order_x0020_ ID
. The name Order ID
is the display name in SharePoint, while Order_x0020_ ID
is the internal name (this name will be used for the template). In SharePoint, the internal name can be retrieved by opening the properties of a column. The URL will show the internal name:
- Enter the required values in the
Custom XML Value
started in step 7-
Namespace
:http://schemas.microsoft.com/office/2006/metadata/properties
-
Path
:/p:properties/documentManagement/*[local-name()="<field>"]
, where<field>
is the name of the field that needs to be used. -
Binding
: enter the required binding syntax to utilize the correct question created in step 6, in this case{{Form.OrderId}}
-
|
- The result should loos like this:
Additionally, the "Title" of the document should also be saved in SharePoint. This can be achieved by utilizing Document Property
- Navigate to the
Advanced
tab, clickAdd property
, selectDocument Property
, and enter the desired values
- Save your template, and upload it to Templafy
- Create the document as an end-user and fill in the 4 questions:
- Save the document to SharePoint. The metadata is shown in the columns and the details pane.
|
Managed Metadata example
A special column of type Managed Metadata can be created in SharePoint. It enables users to select terms from a specific term set. If this column should be used in your template, please follow the below steps.
In this example, the template utilized in the example above is expanded with an additional custom XML that saves the value to a managed metadata column in SharePoint.
|
- In SharePoint create a new column (in this example
Snacks
and selectManaged Metadata
as the type of information. To do this, navigate to the SharePoint homepage -> Select the desired site, for example "Communication site". Then "Site Settings" -> Then "Site Columns" -> Create
|
- In the section
Term Set Setting
a managed term set can be used or a new term set can be created. The latter will be utilized in this example.
- The result looks like this:
- Templafy will require the
Unique Identifier
for each term created in the previous step. Go to the Site Settings page and openTerm store management
:
If you do not see the below window or it looks different, you are in the "Modern" view, click "Return to classic" in the top right window if you wish to follow along in this guide.
- In the Term Store Management Tool, select a term to display the
Unique Identifier
|
- In the Admin Center, create a data source containing all terms along with their corresponding unique identifiers.
- Download the template that was uploaded to the Library in step 12 of the example above. Open the file and the Template designer, and create a new dropdown question linking to the above data source.
- Save the template.
|
- Upload the template to the correct SharePoint library containing the new column
- In SharePoint select the saved template and open the details pane. Add a random value to the new field
Snacks
(and to all other columns that should be use):
- Download the template and open it.
- On the Developer tab select
XML Mapping Pane
. In the fieldCustom XML Part
selecthttp://schemas.microsoft.com/office/2006/metadata/properties
. All available fields (column names) from SharePoint created earlier will be displayed, and a new field named (in this example) "k48e728b471d4ab68c80ce6895fa8dd5" with child elements namedTerms
,TermInfo
,TermName
, andTermId
. In the XML Mapping pane managed metadata fields are not shown with their display name, but with their unique identifier. The identifier shown in this example represents the field (column) 'Snacks' that was created:
|
- Navigate to the
Advanced
tab, clickAdd property
, and selectCustom XML Managed Metadata
- Enter the required values in the
Custom XML Value
started in step 7-
Namespace
:http://schemas.microsoft.com/office/2006/metadata/properties
-
Path
:/p:properties/documentManagement/*[local-name()="<field>"]
,
where<field>
is the name of the field that needs to be used. In this example:/p:properties/documentManagement/*[local-name()="k48e728b471d4ab68c80ce6895fa8dd5"]
-
Term Id
: enter the required binding syntax to utilize the correct question created in step 6, in this case{{Form.Snack.UniqueIdentifier}}
-
Term Name
: enter the required binding syntax to utilize the correct question created in step 6, in this case{{Form.Snack.Name}}
-
|
- Save your template, and upload it to Templafy
- Create the document as an end-user and fill in the 5 questions:
- Save the document to SharePoint. The (managed) metadata is shown in the columns and the details pane. The result will look like this:
DateTime Value Example
A column of type Date and Time can be created in SharePoint. It enables users to select a date from a calendar. If you want to use this column in your template then you need to follow the steps below.
In this example, the template utilized in the example above is expanded with an additional custom XML that saves the value to a date and time column in SharePoint
|
- In SharePoint create a new column (in this example
Date
) and selectDate and Time
as the type of information:
- Download the template that was uploaded to the Library in step 15 of the example above. Open the file and the Template designer, and create a new date question (e.g. "Date").
Save the template.
|
- Upload the template to the correct SharePoint library containing the new column
- In SharePoint select the saved template and open the details pane. Then add a random value to the new field
Date
(select any date from the calendar). - Download the template and open it.
- On the Developer tab select
XML Mapping Pane
. In the fieldCustom XML Part
selecthttp://schemas.microsoft.com/office/2006/metadata/properties
. All available fields (column names) from SharePoint created earlier will be displayed, and a new field named (in this example)Date
- Navigate to the
Advanced
tab, clickAdd property
, and selectCustom XML DateTime Value
- Enter the required values in the
Custom XML Value
started in step 7-
Namespace
:http://schemas.microsoft.com/office/2006/metadata/properties
-
Path
:/p:properties/documentManagement/*[local-name()="<field>"]
, where<field>
is the name of the field that needs to be used. In this example/p:properties/documentManagement/*[local-name()="Date"]
-
Binding
: enter the required binding syntax to utilize the correct question created in step 6, in this case{{Form.Date}}
-
- Save your template, and upload it to Templafy
- Create the document as an end-user and fill in the 6 questions:
- Save the document to SharePoint. The date is shown in the column and the details pane. The result looks like this:
Dynamics metadata in PowerPoint
Despite that PowerPoint does not have an XML Mapping Pane, you can configure Dynamics metadata in PowerPoint with Templafy (this basically works the same way as in Word).
To find the namespace of the xml you can follow these steps (example with SharePoint):
- Create a PowerPoint template (you don't have to create form fields etc.).
- Upload the template to SharePoint.
- Download the template from SharePoint.
- Rename the extension
.pptx
to.zip
.
- Unpack the zip file.
- In the unpacked folder open the 'customXml' folder:
- This folder contains 1 or more 'itemX.xml' files:
- Open each file until you find one that has content that looks like this:
- The namespace is marked green in the image above.
Related articles
Comments
Article is closed for comments.