About this article
In order to enable Templafy Admins and Owners on the extensive capabilities of the Dynamics module, we have accumulated a list of methods and techniques for building and maintaining data sources, Forms, bindings and configurations for efficient and scalable smart templates!
- Build easily identifiable reference fields within data sources
- Seamlessly manage the visibility of text elements within smart templates
- Placeholder text best practices
- Elements of a template that should be made dynamic
- Efficiently hide grouped elements of a smart template
- Smart template maintenance
Build easily identifiable reference fields within data sources
When building data source schemas and adding fields that refer to other data sources, it is best practice to use the naming convention '
DataSourceName+Ref'. This way, referenced fields are easily identifiable when using them as drop downs in Dynamic content. For example, if the
Offices data source is referring to the
Cities data sources, the fields that will be created in the
Offices data source should be named
CitiesRef as seen below:
Seamlessly manage the visibility of text elements within smart templates
When attempting to hide a text element within a smart template, it is best practice to use the visibility setting within the template (the text element content control) rather than using the visibility setting within the text element itself. Below is an example:
The below text element, called
Retirement Plan, is static but text elements can also contain dynamic elements as well! More information on how to leverage dynamics to show or hide questions based on answers to other questions can be found in this this Knowledge Base article.
In the template, there is a checkbox Form called
In the past, in order to hide this text element, the text element binding would have been wrapped in a Group binding that had visibility settings (like the below screenshot). But this is no longer best practice.
The current best practice is to create the text element binding with a custom visibility setting that will hide the text element if the checkbox remains unchecked during document creation:
Visibility expression for reference:
Placeholder text best practices
When creating placeholders for dynamic bindings / content controls, it is important to remember that placeholders should be brief, descriptive (never an actual value), and unformatted. Placeholder text like
[Disclaimer] are preferred over placeholder text like
[December DD, 20YY],
In Word, using the
All caps setting in the Font configuration for binding placeholder text can lead to unexpected consequences. The setting we are referring to is this one:
In some cases, using this setting can lead to the dynamically inserted text to be completely capitalized after the
Update document functionality was used (which was not the intention):
In other cases, using the setting caused the dynamically inserted text to not work at all.
Elements of a template that should be made dynamic
In our experience, there are elements of a template that should always be dynamic. Making these elements dynamic will ensure that your dynamic content is seamlessly updated in case of acquisition, integration or divestment of companies, scalable, consistent and on-brand.
Elements of templates that should be made dynamic:
- Sign offs (Regards, Best regards, Sincerely, etc.)
- User information and Office location
- Document Classification (sensitivity labeling)
- Date fields
- Repeated content
Efficiently hide grouped elements of a smart template
First of all, it is Templafy's recommendation to avoid using nested dynamic groups within templates whenever possible. Not using nested groups may result in more dynamic bindings being configured but using nested dynamic groups may lead to unexpected behavior with the resulting values.
Below is an example of a nested and not nested group binding. The goal of the below bindings is to hide either the Name and / or Name2 based on the end users answers to the Forms / gating questions:
Visibility expression for the first group binding on example 2:
""), VisibilityType.Hidden, IfElse(Equals(Form.Name2, ""), VisibilityType.Visible,
Visibility expression for the second group binding on example 2:
""), Equals(Form.Name2, "")), VisibilityType.Hidden, IfElse(Equals(Form.Name2,
""), VisibilityType.Hidden, VisibilityType.Visible))}}
Make updating text that is shared between several templates a breeze (Group vs text element bindings)
In your template creation journey, you may find that there are blocks of text that are being used across several templates. These blocks of text may be inserted into the final document based on gating questions (dynamic forms). For these types of blocks of text or repeated content, it is best practice to create text elements from these blocks of text as opposed to keeping the blocks of text in each template and controlled with a Group binding and visibility expression. This way, if anything changes to the block of text, it just needs to be updated in one location and the change will update in every template it is used! See the below example:
Below is a check box Form field called
The block of text that is used for Company Facts, is used within several templates. Considering it is used within several templates, it is best practice to create a text element and create a text element binding to insert the text if the check box is checked during document creation. This way, updating the text across several templates is a breeze!:
Visibility expression for reference:
Ensure that newly created or recently updated smart templates function as expected with comprehensive testing procedures
It is important to thoroughly test newly created or recently updated smart templates before making them live to the end users.
Below is a list of items / acceptance criteria to keep in mind when testing your newly created or updated smart templates:
- Use a test or QA tenant to perform your testing
- If you do not have a test or QA tenant, please contact your Templafy Account Manager for more details
- If no test or QA tenant is available, create the template or copy the existing template into a filtered folder while testing is taking place. More information on how to filter folders can be found here.
- Test all of the different combinations of gating questions, both new and old, to ensure that all scenarios are accounted for
- Test new smart templates and updates to existing templates with the
Update documentfunctionality (if applicable)
Smart template maintenance
Once a smart template has been created using the aforementioned best practices, maintenance of that smart template becomes paramount.
One of the most important things to remember when updating either a template or text element in the Templafy library, is to download the template or text element first from the Templafy library, update it, and then use the replace functionality to upload it back into the Templafy library. Using the replace functionality will ensure that the original asset ID is retained and will not break any content using the template or text elements.