Overview
This article explains how to implement InfoSheet blocks in precedents using Mail Merge fields in Microsoft Word.
It is a behavioural deep-dive for Template Administrators and advanced users who are already building complex InfoSheets and blocks and need to structure them correctly in precedents.
The article focuses only on the Mail Merge block syntax used in Word documents, including Start and End markers, nested blocks, and the reserved block properties available during document assembly.
This article does not cover how to create or configure blocks, fragments, or InfoSheets. Those workflows are documented separately and are assumed knowledge.
Important: Mail Merge Fields Required for Blocks
InfoSheet blocks are supported only with Mail Merge fields. Block start and end markers are not supported using Content Controls.
Note: Content Controls may still be used elsewhere in the document for non-block InfoSheet fields.
Basic Block Syntax
All InfoSheet blocks in documents use a Start / End Mail Merge structure.
A block structure consists of:
- A block list start marker
- A block instance start marker
- One or more fields within the block
- A block instance end marker
- A block list end marker
Canonical Syntax
How Block Syntax Is Interpreted
The Start and End markers define how OneLaw processes block data during document assembly.
- Start:InfoSheetPrefix.BlockElementName marks the beginning of the block list (all instances of the block)
- Start:BlockTypeName marks the beginning of a single block instance
- Fields such as Name and reserved properties such as separator are accessed within the block instance
- End:BlockTypeName marks the end of the current block instance
- End:InfoSheetPrefix.BlockElementName marks the end of the block list
The system automatically repeats the content between Start:BlockTypeName and End:BlockTypeName for each block instance captured in the InfoSheet.
Example: Basic Repeating Block
For an InfoSheet with:
- Prefix: Property
- Block element name: Chattels
- Block type name: Chattel
- Field: Name
Nested Blocks
InfoSheet blocks can be nested by repeating the same Start / End structure at each level.
Each nested block:
- Has its own Start and End markers
- Is fully contained within its parent block instance
Example: Nested Blocks
In this structure:
- Warranty details repeat within each chattel instance
- The same block rules apply at each nesting level
Reserved Block Properties
Each block instance automatically includes a set of reserved properties that can be used as Mail Merge fields within the block.
Available reserved properties:
- index - the position of the instance within the block (starting at 1)
- count - the total number of instances in the block
- is_first - true only for the first instance in the block
- is_last - true only for the last instance in the block
- separator - the resolved separator text for the instance, based on the block’s HasSeparator configuration
These properties are available only within a block instance.
Example: Using Reserved Block Properties
In this example:
- Introductory text appears only for the first instance
- A separator is conditionally applied between instances
- The final instance is handled differently using is_last