Articles in this section

How to set a custom document property in the metadata of a template

This article explains what custom document properties are and provide examples of how they can be used with the binding syntax in smart templates.

  Prerequisites

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Admin/owner access to the Templafy tenant and Space owner access.

What are custom document properties?

Custom document properties is data about a document, also known as metadata.

Metadata is information about a document that is not part of the main content. It helps describe its content and characteristics. In e.g. a Word document, metadata can include details like the title, author, creation date and last modified date. This information helps to organize, search for, and manage documents more effectively in Document Management Systems (DMS) such as SharePoint.

Custom document properties can be used to create properties that aren't covered by the standard document properties. Often, this is specific metadata needed for a DMS such as versioning, ID numbers, etc..

  Important

  • Custom document properties are only supported with templates that are stored in the Libraries (Documents, Presentations, and Spreadsheets Libraries).
  • Assets (Text elements, Email elements, Slides, and Slide elements Libraries) inherit custom document properties from the document, presentation or spreadsheet upon insertion.
    • In case of Text elements, a custom document property only works when the text element is opened directly from the Web App (as if it were a document).

In Office custom document properties can be created via File > Info > Properties > Advanced Properties, on the Custom tab. For example the field Classification in a Word document:
customdocumentpropertyclassification.png

How to set a custom document property in a smart template

When building the template settings and properties, the Custom Document Property can be used for custom document properties for the smart template, following the steps below:

  1. In Template Designer, open the Advanced tab.
  2. Click + Add property.
  3. In the Type field select Custom Document Property.
  4. In Property Name enter the desired property name, for example 'Classification'.
  5. In Property value enter a static value (plain text without quotes) or a binding like {{Form.Classification.Name}}.
  6. Click Add to document:
    advancedtabcustomdocumentproperty.png

      Important

    The maximum number of characters that can be saved to a custom document property is 255 (this is a Microsoft Office limitation).

Custom document property examples

Example 1

Using Custom Document Property to always use 'Draft' (without quotes) as the Version property.

Binding Output
Draft Version property = "Draft"

Example 2

Using Custom Document Property to set the Classification property of the template based on the 'Classification' dropdown question originating from the response form.

Binding Input Output
{{Form.Classification.Name}} Form.Classification.Name = "Internal" Classification property = "Internal"
  Form.Classification.Name = "External" Classification property = "External"

Example 3

Using Custom Document Property to set the Location property of the template based on the 'Location' field originating from the User Profile.

Binding Input Output
{{UserProfile.Location}} Location = "Copenhagen" Location property = "Copenhagen"
  Location = "Berlin" Location property = "Berlin"

Example 4

Using Custom Document Property to save the name of the template as TemplateName property. This shows which template was used to create the document (in the example the 'Memo' template):

Binding Output
Templafy 'Memo' template TemplateName property = "Templafy 'Memo' template"

customdocumentpropertytemplatename.png

functions blank hyperlink hide form field create template a malformed uri was found in the document tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.