Patrotest Wiki

Translations of this page:

This is an old revision of the document!


Template Edition Rules

Data to the template can be imported in two ways:

  • $var_name$ - variable with $$
  • Bookmarks

Data of any format can be imported: number, picture, date, string, boolean, etc.
The value can be formatted according to the program settings or by using formatting strings in the template.
Data can be inserted in any locations: headers, tables, strings, etc.

$var_name$

$var_name$ - variable in $$ that will be replaced with formatted value. All $var_name$ with same name will be replaced in all part of documents.
Library use current font settings of the $var_name$ during filling. For example, if there are several variable with same name but with different fonts, each variable use particular font settings.

$var_name%%m.%d.%y%$

$var_name%%m.%d.%y%$ - variable with formatting string.
There are some cases when user need to filled current data in different part of report with different format. For example: 01.01.20018 or 01/01/18.

Bookmarks

Set bookmark visible in MS Word settings





Bookmarks have two style:

  • Simple
  • Ranged – select range of text

Simple bookmark is filled by value beginning from right.
Range bookmark is filled by values beginning from right bracket. Text in bracket will be deleted from the report if there is no import. It’s very useful when customer use big template with a lot of fields and tables which can be deleted if it’s not filled.

Description

There are four options available for value placement:

Name Description Example
variable text designation of variable enclosed by '$'

$var_name$ - any phrases in $$ will be replaced with string data or picture\pictures. All $var_name$ with same name will be replaced in all part of the template.

Font formatting settings will be saved
$var_name$
formatted variable Variable with string format.
String formatted variable overwrites the software settings.

$var_name% %m.%d.%y%$ - variable with string format.
Very useful when you need to fill current date in various part of the doc and with different format: 01.01.20018 or 01/01/18.
$var_name% %m.%d.%y%$
$var_name% %X%$
bookmark You can use Word bookmarks to import data into the protocol.
There are two modes of data import available:
-String
-Cell in table

Place bookmark with string mode in any part of template to export values from the software.
“Cell in table” is used to fill several closed cells in any table.

Set bookmark visible in MS Word settings
ranged bookmark Range bookmark is a part of the text selected by a bookmark. It will be deleted if there is no data imported from the program.
There are two modes of data import available:
-String
-Line in table

It is very useful when you want to use a single template for different tests. If the table is empty, they will be deleted.
Text will be deleted in case no import:

Table name


All variables\bookmark available and format strings you can find in the “Report Data” settings in the software.





Examples

Variables\bookmarks Description
$TR_Number$ String with value format specified in the software
$TR_Number%UW%$String with value format specified in the template
$TR_Date$Date with the format specified in the software
$TR_Date% %x%$Custom format in the template
$TR_Date% %d %B %Y%$Custom format in the template
$final_judgment$Boolean with the format specified in the software
$final_judgment%“Pass”; “Fail”%$Custom boolean format in the template



See an example of a protocol template: demo_template_example.docx