Configurable merge codes
Certain merge codes can be configured to display information in more than one format.
The configurable merge codes must be handled in accordance with the merge engine used in F2.
An example of this type of merge code is date fields. To merge a record’s letter date with a document, use the merge code $dossier_letterdate$. The standard format for dates is dd-mm-yyyy.
Specify a different format by appending it to the merge code:
-
$dossier_letterdate.date(“MM-dd-yyyy”)$
Exact specifications for date formatting options are available in Microsoft’s online documentation of .NET.
Insert automatic text alternatives in boolean fields
You can use the function $field.TrueFalse("text1", "text2")$ in boolean merge fields. The function allows you to define two text alternatives where one will be automatically merged into a Word document. Which of the two text alternatives is inserted depends on whether the true or false value is selected in the field, for example in a case guide. This function may be relevant to use in tandem with F2 Task Guides.
Choose uppercase or lowercase for merge fields
You can choose whether the content of a merge field in a Word template should be written in uppercase or lowercase. Add "ToLower()" to the merge code to choose lowercase, or "ToUpper()" to choose uppercase, for example:
-
$case_status.ToLower()$ merges the case status written in lowercase.
-
$case_progresscode.ToUpper()$ merges the case progress code written in uppercase.
"ToLower()" can be used, for example, if the content in a merge field needs to be merged into the middle of a sentence and therefore needs to be written in lowercase. This function may be relevant to use in tandem with F2 Task Guides.
Generate merge field as QR code
You can use the $field.ToQR("X cm")$ function to generate a QR code based on the merge field. X is a variable that defines the size of the QR code and can be written in decimal numbers with either a comma or a period. Examples:
-
$dossier_title.ToQR("3cm")$ generates a QR code measuring 3 x 3 cm, displaying the record title when scanned.
-
$case_f2casenumber.ToQR("4,75 cm")$ and $case_f2casenumber.ToQR("4.75 cm")$ both generate a QR code measuring 4.75 x 4.75 cm, showing the case number when scanned.