Adding variables to Document Types

  • Updated

System variables basically contain the metadata that has been introduced in the system: Dates, Names, Roles, etc.

Variables are added to the Template you upload when creating a Document Type.

Documents that are created based on that Document Type will pull the corresponding details from the system and fill out the variables in your Documents

By adding variables to the template of your Document Type, you can preconfigure the information that Documents based on that particular Document Type will include and in which order the variables will be shown.

There are variables for all modules in Scilife.

Module variables can be used independently by Module, for example when setting up a Trainings Report that only includes variables from the Training Module.

Variables can also be combined across Modules, this could be the case for a Document Type for Event Reports. This Document Type could include variables from various Modules at the same time such as Events, CAPAs, Change Control, and Document Control.

Document Control Variables

You will find all the variables related to Document Control by following these steps:

  1. Go to Documents > Document Types.
  2. Click on the New + icon.
     

mceclip0.png

 

The Supported Variables in Document Templates are to be found on the right-hand side of the Document Type Details Form: 

  1. You will see the links to the variables of the Modules that are activated in your System.
  2. By clicking on the links you will access the list of variables for that particular Module.

 The list of variables of the corresponding module will appear:

 

Adding Variables to your Document Template

From the List of Variables, you can copy the variables you wish to add to your Document Template. Simply select the variable, copy the variable and paste it into the Document Template, in the place where you want it to appear.

Add all the variables you need to your Template and save it.

Upload the Template as a Document Type.

Documents that are created based on this Document Type will include all the variables that you have added to the Template.

The variables will be populated with the corresponding information introduced in the system (Author(s), Reviewers(s), Date(s), Id(s), etc.

The result will be similar to what is shown in this header:

 

Variables_Document4.png

Using Variables with _separator_LB and _N/A

Certain variables (marked with # in the variable list) support an alternative formatting option using the _separator_LB suffix.

  • By default, these variables return values as a comma-separated list.
  • When using _separator_LB, values are displayed as a line break–separated list.
  • Use this option when you need improved readability, especially for longer lists.

Example: 
${linked_documents} will output:
→ Document A, Document B
${linked_documents_separator_LB} will output: 
→ Document A
→ Document B

Additionally, variables can be configured to display N/A when no value is available by adding the _N/A suffix. These variables will only correctly be replaced with N/A once the document reaches status Approved, not Published. 

Example, if no value found: 
${Tags} will output:
→ (empty)
${Tags_N/A} will output: 
→ N/A

When using the _N/A suffix with grouped variables, please consider:

If the entire group is empty:
${groups} → (empty output)
${groups_N/A} → N/A

If at least one field in the group contains a value:
→ The group is displayed as a table
→ Empty fields within the group appear as empty cells (not N/A)

 Relevant for: Administrators / Managers.

Please note:

  • Variables only work with docx, xlsx and pptx files.
  • In the Document Viewer, the variables will be filled out if the corresponding information is available in the system. When you do Live Edit and for instance edit a Document in Word, the variables will not be auto-filled, you will just see the variable.

Was this article helpful?

4 out of 4 found this helpful

Have more questions? Submit a request