A document template is a Word file (.docx) with tags in it, such as {document.number}. File From Template makes a new file from a template and replaces each tag with the value from the document, its project and its product. Use it for cover sheets, forms and other files that look the same on every document.
File From Template and the Templates menu item need the Document templates add-on, sold separately. Without it, they do not show.
The add-on also turns on SMDL. This gives the Include in SMDL field on project documents and the column of the same name in the document list. It also gives the SMDL report. To get the report, right-click a project document in the document list. Then choose Download SMDL for, followed by the project's number and name. The report downloads as a Word file and includes the project's documents with Include in SMDL ticked. See Document info and persons.
Create a file from a template
You can create a file from a template in three tabs on a document. Where the file ends up depends on the tab:
| Tab | Where the file goes |
|---|---|
| Revisions | Downloaded to your computer. Add it to a revision with From Device. See Revisions. |
| Drafts | Added to the draft you choose. Locked drafts are not offered. You need the right to add files to the document's drafts. |
| SharePoint | Uploaded to the document's SharePoint area. Needs the Draft/SharePoint integration add-on, and you must be signed in with your Microsoft account. See Draft and SharePoint. |
- Open the document.
- Turn on edit mode (the switch top right, or F2).
- Go to the Revisions, Drafts or SharePoint tab.
- Click File From Template. In the Drafts tab, you can also use File From Template on a draft's row. Then Triark EDM chooses that draft for you.
- Under Template Name, choose the template.
- In the Drafts tab only: under Draft, choose the draft. Triark EDM chooses the latest draft for you.
- Click Save.
Triark EDM makes the file name from the project number, the product number and the document's category. The name ends in .docx. A file for a library product's document starts with the product number. From the Revisions tab the name ends in RN_LN, which you replace with the revision number. In a draft it ends in the draft's number. From the SharePoint tab it ends in 0_0.
When the app asks about unrecognized keys
If the template uses tags that are not in the document data, the app asks This template has unrecognized keys before it saves the file. The app lists the keys, and they come out empty in the file. Click Continue anyway to keep the file with those values empty, or Cancel to stop. A tag like that is usually misspelled. An administrator fixes it in the template.
When the template has errors
If the template is broken, the app makes no file. A red panel lists each error with the tag it is about and how to fix it. Ask an administrator to fix the template. See Errors.
Other messages
| What you see | What it means |
|---|---|
| The Template Name field is cleared | Someone deleted or replaced the template while you made your choice. Choose it again. |
| A message that the file could not be made or uploaded | The message says which step failed and why. The step is either the file creation or the upload to SharePoint. |
Manage templates
Administrators (the Admin user type) manage the templates. See Users.
Every document shares the templates. A change is live for everyone at once.
There are two ways to open the templates:
- Standard > Document > Templates in the menu.
- Edit templates under Template Name when you create a file from a template. This opens the templates for that document, so you can test a template on it.
The templates open in a window over the page you are on. Close it to continue where you were.
To add, change, reorder or delete templates, turn on edit mode first. Without edit mode you can open, download and preview the templates, but not change them.
Each row in the list has these actions:
- Download: saves the template, so you can edit it in Word.
- Replace: swaps the template's file. See Change a template.
- Test template: makes a file from the template and the document, and shows it. Triark EDM saves nothing. Only when you opened the templates from a document.
- Preview: shows the template as it is, with its tags. You can also double-click the row.
Drag a row by its handle to change the order. Template Name lists the templates in the same order.
Add templates
- Turn on edit mode (the switch top right, or F2).
- Open the templates.
- Click Template.
- Under Template files (.docx), choose one or more .docx files, or drag them onto the field. The field takes only .docx files.
- To check a file, click Preview on its line to see it. If you opened the templates from a document, you can also click Test. The test makes a file from the template and that document, and shows the values. Triark EDM saves nothing.
- Click Create.
Triark EDM names the new templates after their files and puts them at the bottom of the list. If a file was not tested, or reads unrecognized keys, the app asks you first. Click Create anyway to go ahead. You cannot create a template from a file whose test found errors. Fix the file in Word first, and choose it again.
See which keys a template reads
After a test without errors, click the file's name to open the list of keys the template reads:
- Unrecognized keys come first, in a box of their own. They come out empty in every file made from the template, usually because they are misspelled.
- Then the keys that the app found, with the value each had on the document.
Copy used copies every key in the list, one per line.
Change a template
- Click Download on the template's row.
- Edit the file in Word.
- Click Replace on the same row.
- Under Edited file (.docx), choose the edited file, or drag it onto the field.
- If you opened the templates from a document, click Test on the file's line. Then check the values.
- Click Replace. If the file was not tested, or reads unrecognized keys, click Replace anyway to go ahead.
The template keeps its name and its place in the list. The new file is live for every document at once.
Delete templates
- Tick the templates in the list.
- Click Delete.
- Confirm.
Triark EDM removes the templates for every document. You cannot undo this. If you keep the template as a document in Triark EDM, add it back from that document. Otherwise, download it first.
Good habits
- Keep every template as a document in Triark EDM, all of them in one agreed place. Its revisions show the history and who changed what. They also give you a way back to an earlier version.
- Add the changed file as a new revision, then replace the template with exactly that file. The document and the live template are not linked, so do both every time. Say in the revision description what changed.
- Test on a document that has the values your template uses filled in. Open the templates with Edit templates from that document. Then test the file and check every value.
- Fix every unrecognized key before you confirm. If you confirm anyway, everyone gets files with empty values.
- Name the file for the people who use it. A new template takes its file's name, and that is the name they choose from under Template Name.
- Order the list on purpose. Put the most-used templates first.
- Use only the keys under All values. They keep working after every update.
Write a template
Write the template in Word and put a tag where each value goes. Every tag starts with one of four names:
| Name | Holds |
|---|---|
document |
The document the file is made from, with its current revision, people and references |
project |
The document's project. Empty for a document in the product library |
product |
The document's product |
generation |
This file: the day it is made, and the draft it is made into |
Use a dot to reach a value inside another, as in {document.revision.status.name}. All the values are listed under All values.
The data follows these rules, so a template keeps working in later releases:
- Every value is always there. A text or date that is not set is empty. A number that is not set is
null. A yes/no value is false, and a list is empty. - A date is a day, written
YYYY-MM-DD. Format it withformatDate. - Values are what you see in the app, never internal IDs.
- New releases add values, but never rename or remove them.
Values
Put the value's name in curly braces. The value takes the formatting of the tag: make the tag bold, and the value is bold. The value keeps its line breaks. A value that is not set comes out empty, and the app still makes the file.
| In the template | Gives |
|---|---|
{document.name} |
The document title |
{document.revision.number} |
The current revision number |
{document.revision.status.name} |
The status of the current revision |
{project.installation.name} |
The project's installation |
Lists
Everything between {#document.persons} and {/document.persons} repeats once per person. Inside the loop, a name refers to the current person:
{#document.persons}
{name}, {role.name}
{/document.persons}
To repeat a table row, put the opening tag in the row's first cell and the closing tag in its last cell. For example, write {#document.persons}{name} and {role.name}{/document.persons}.
To show text only when a list is empty, use ^ instead of #: {^document.persons}No people assigned.{/document.persons}.
Conditions
| Purpose | In the template |
|---|---|
| Text that depends on a yes/no value | {document.includeInMdl ? "Yes" : "No"} |
| A passage shown only when a value is true | {#document.includeInMdl}Part of the MDL.{/document.includeInMdl} |
| A passage shown only on project documents | {#project.number}Project {project.number}{/project.number} |
| Text that depends on a number | {document.revision.fileCount > 0 ? "Files attached" : "No files"} |
Formatting
Add a filter after a | (vertical bar) to format a value.
| Filter | In the template | Value | Gives |
|---|---|---|---|
| Date | {generation.date | formatDate:"DD.MM.YYYY"} |
2026-01-23 | 23.01.2026 |
| Decimals | {document.estimatedHours | number:"1"} |
12.46 | 12.5 |
| Upper case | {document.name | uppercase} |
Drawing list | DRAWING LIST |
| Lower case | {document.status.name | lowercase} |
Approved | approved |
| First letter capital | {document.status.name | capitalize} |
APPROVED | Approved |
| Each word capital | {document.createdByName | titlecase} |
KARI NORDMANN | Kari Nordmann |
| Fallback text | {document.description | default:"None"} |
(empty) | None |
Date patterns use YYYY (2026), YY (26), MM (01) and DD (23), in any order with any separator. Without a pattern, formatDate gives DD.MM.YYYY. capitalize and titlecase also put the other letters in small letters. number rounds and writes the decimals after a point, not a comma.
Inside a condition, put the filtered value in parentheses: {document.revision.date ? (document.revision.date | formatDate:"DD.MM.YYYY") : "Not revised"}.
Common mistakes
- Start every tag with its name. Write
{document.number}, not{number}. - Test a value, not an object.
{#project}is always true. Use{#project.number}to show something only on project documents. - Do not wrap the whole template in
{#document}…{/document}. It adds nothing and changes what the names inside it mean. - Watch names inside a loop. Inside
{#document.wbsReferences},{number}is the WBS number. Write{document.number}for the document's number. +joins values, but the text around an empty value stays:{project.number + ", " + project.name}ends in a comma when there is no name. A number that is not set prints as "null", so use separate tags for numbers.- Format dates. A date without
formatDateprints as2026-01-23. - Quotes. Word's curly quotes are fine. The quotes « » „ ‚ break a tag.
- Close a list with the same name you opened it with.
- A test does not fill in a draft.
{generation.draft.number}is empty when you test a template. {product.info}is empty for a library product. It comes from a project product only.
Errors
When a template is broken, the app lists every error with the tag it is about. The ones you are most likely to see:
| Error | Cause | Fix |
|---|---|---|
| A tag is not closed | {product.name with no } |
Add the closing } |
| A list loop is not closed | {#document.persons} with no {/document.persons} |
Add the closing tag with the same name |
| A list loop is closed but never opened | {/document.persons} with no opening tag before it |
Add the opening tag, or remove the closing one |
| A loop is closed with a different name | {#document.persons} closed by {/document.wbsReferences} |
Use the same name in both |
| A tag is not a valid expression | Often a « » „ ‚ quote in the tag | Retype the tag with straight quotes |
If a tag is not closed, the app shows the tag together with the text after it. The reason is that the app cannot tell where the tag was meant to end. It still shows where to look.
All values
Inside a list, write the names in the right-hand part of the table, such as {name}.
Document
| Tag | Value |
|---|---|
{document.number} |
Document number |
{document.name} |
Document title |
{document.description} |
Description |
{document.optionalNumber} |
Optional number |
{document.optionalName} |
Optional name |
{document.clientReference} |
Client reference |
{document.submission} |
Submission |
{document.includeInMdl} |
Yes/no: Include in SMDL |
{document.estimatedHours} |
Estimated hours (number) |
{document.estimatedStartDate}, {document.estimatedFinishDate} |
Estimated start and finish date |
{document.targetStartDate}, {document.targetFinishDate} |
Target start and finish date |
{document.createdOn}, {document.updatedOn} |
When the document was created and last changed |
{document.createdByName}, {document.updatedByName} |
Who created and last changed the document |
{document.category.name} |
Category: the last name in the first category path. A document can have several categories |
{document.supplierCompany.name} |
Document supplier |
{document.status.name} |
Document status |
{document.status.description} |
Comment on the status |
{document.status.createdByName}, {document.status.createdOn} |
Who set the status, and when |
Current revision (all empty when the document has no revision)
| Tag | Value |
|---|---|
{document.revision.number} |
Revision number |
{document.revision.description} |
Revision description |
{document.revision.responsibleName} |
Person responsible for the revision |
{document.revision.fileCount} |
Number of files in the revision |
{document.revision.date} |
Revision date |
{document.revision.status.name} |
Revision status |
{document.revision.status.description} |
Comment on the revision status |
{document.revision.status.createdByName}, {document.revision.status.createdOn} |
Who set the revision status, and when |
Lists on the document
| List | Names inside the loop |
|---|---|
{#document.persons} People on the document |
{name}, {role.name} |
{#document.wbsReferences} WBS references |
{number}, {name} |
{#document.folderReferences} Folders |
{number}, {name} |
{#document.zoneReferences} Zones |
{number}, {name} |
Project (all empty for a document in the product library)
| Tag | Value |
|---|---|
{project.number} |
Project number |
{project.name} |
Project name |
{project.description} |
Project description |
{project.customerReference} |
The project's customer reference |
{project.installation.name} |
Installation |
{project.status.name} |
Project status |
Product
| Tag | Value |
|---|---|
{product.number} |
Product number: the project product's, otherwise the library product's |
{product.name} |
Product description |
{product.info} |
Project product information. Empty for a library product |
This file
| Tag | Value |
|---|---|
{generation.date} |
The day the file is made |
{generation.draft.number} |
The number of the draft the file is made into. Empty otherwise |
