Introduction to F2 Merge Codes

F2 Merge Codes is an add-on module that supports the merging of data from F2 with Microsoft Word templates. The add-on simplifies the creation of standard documents and streamlines the process of creating multiple identical records and emails for different participants.

F2’s participant register and metadata fields contain merge fields with information. Using merge codes, this information can be retrieved and inserted directly into documents. This allows users to add addresses, case titles, and other information quickly and efficiently, which in turn reduces the risk of errors and improves the quality of produced documents.

Merging is made possible using document templates, which are added to records. These templates contain one or more merge codes, and the codes determine which data are retrieved from merge fields in either F2’s participant register or metadata fields.

The following instructions require familiarity with F2 Basics and the use of templates in F2.

Merge codes

A merge code is the code written in templates in place of the desired data that is retrieved from merge fields. Merge codes are always one of three general types:

  • Codes retrieving metadata on records.

  • Codes retrieving metadata on cases.

  • Codes retrieving participant data used when copying records.

The merge codes follow a specific syntax. Every code starts with a “$” followed by text specifying the desired type of code.

For example:

  • $dossier for record information.

  • $case for case information.

  • $mergeparty for merging information from multiple participants on copies of records.

The type is followed by the name of the desired merge field, and the code is finalised by another “$”.

The merge code’s parts are linked together with “_”. For example, to insert the responsible user for a record, the corresponding merge code would look like this:

  • $dossier_responsiblename$

Merge codes must follow the above syntax to work as intended. Further examples of correct merge codes can be found in Merge field examples.

Organisations using F2 Task Guides will also be able to retrieve data from related merge fields using the prefix $case_fielddata.

Merge codes referring to empty data fields will be removed when generating documents so any generated document will be free of codes. Please note that this does not apply to $mergeparty codes.

Merge codes can also be used in combination with the F2 Phrases (documentation available in Danish) to merge information into standard texts.