YakDocs - Addin Help

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.

With the Addin

You can download the addin from the marketplace.

  • Login to the addin with you YakDocs username and password; it will be the same as you use on the website.
  • It will quickly download a list of your current workflows that you have created.
  • Select from the Workflows select box the workflow for which you are creating a template.
  • The questions will now populate and allow you to add variables, conditionals, and repeating areas.

Adding Variables

To add a variable, after you have selected a workflow:

  • Place the cursor in the document where you want the variable inserted.
  • Go to the Insert Variable tab of the addin (it is selected by default).
  • Select a variable from the list.
  • Click Insert button.
  • The markup for inserting a variable will now appear in the document where your cursor was positioned.

Conditional Paragraphs or Tables

To make a paragraph show based on the value of a variable:

  • Place the cursor in the paragraph, table, or table row that you want to show or hide based on the condition.
  • Click on the Conditional tab of the addin.
  • Select the variable on which the item will depend.
  • Select the type of check you want to perform on the field, such as Equals or Contains.
  • Enter the value in the last box that you want to compare it against.
  • Click the Insert button.
  • A comment will be entered in the document at the start of the paragraph or table that marks it as a conditionally appearing element.

Without the Addin

Inserting Variables

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 or Tables

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.

Uploading Templates

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