Templates are created as normal Microsoft Word documents with some special markup.
Templates can be created with or without the YakDocs Addin for Microsoft Word. The addin simply helps by listing the variables from your workflow and inserting them into the document with the correct markup.
You can download the addin from the marketplace.
To add a variable, after you have selected a workflow:
Insert Variable
tab of the addin (it is selected by default).Insert
button.To make a paragraph show based on the value of a variable:
Conditional
tab of the addin.Equals
or Contains
.Insert
button.Variables can be referenced by the id of the question in the workflow. In the template you find the place where you want to insert the data from the question and insert the variable markup. If you had a question with id myQuestionId
, then you would type ${myQuestionId}
. When the template is processed, the markup will be replaced with the answer to the question.
Conditional paragraphs and tables are created used special comments that tag the element. Simply create a comment on the paragraph, table, or table row that adheres to the format below:
Use displayParagraphIf( myVariableName == 'value to check' )
to do a simple check and show the paragraph if the variable equals the value.
Use displayTableIf( myVariableName == 'value to check' )
to do a simple check and show the entire table if the variable equals the value.
Use displayTableRowIf( myVariableName == 'value to check' )
to do a simple check and show the table row if the variable equals the value.
On the Templates
page, there is a button for Upload Template
. That button will open a popup modal with a file upload.
Click the file upload, select the .docx
file on your computer that you wish to upload.
Click the Upload
button. The page will refresh with your new template.
If you wish to add the template to a workflow, go to the Workflows
page, click Edit
next to the target workflow. Go to the last tab, and select the checkbox next to the template you just uploaded.
For additional help, please contact us at care@yakdocs.com