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 open external.

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 an Excel or 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 case guides.

Choose uppercase or lowercase for merge fields

You can choose whether the content of a merge field in an Excel or 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 case guides.

Syntax for list merge fields

It is possible to merge lists from F2 into an Excel or Word template.

For Excel templates, each row in a list will be merged into an Excel row.

For Word templates, data containing lists can be merged in various list forms such as a table or a bulleted list. In the Word document, each list element will be merged into a table row, a bullet point, or a section.

Use the following syntax to add a list to an Excel or Word template:

$[case_fielddata_LISTNAME].FIELDNAME$

List merge fields must start and end with the "$" sign as with regular merge fields. For list merge fields, the name of the merge field must be put in square brackets. After the merge field’s name, you must specify which field from the list to include in the template.

Variables from a case guide can also be used in Excel and Word templates. These must be prefixed with "case_vardata_".

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.