skip to Main Content

xplan xmerge

Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation

Xmerge Output Filename

Typically when you merge a document from Xplan it will output with a filename like “reportout-9733.doc”.

The syntax here allows you to control the filename output so you can make them human friendly and related to the content in them:

Setec Astronomy

<:=$flags(‘output_by_syntax’, value=[‘name of your document’], parent_value=[‘used for zip files’]):>

In the above example the merge report would generate named “name of your document.doc”

Parameters explained


This is where you define the file name of your output.

While there are some limits (see below) generally any string based data can be used as the output name.


When you are running bulk merges or including attachments in a merge report, the zip file that generates will adopt the name here.  When no zip files are present in the merge this parameter has no impact.


Some off the shelf examples:

Setec Astronomy

<:=$flags(‘output_by_syntax’, value=[str(‘Portfolio Report – ‘), str(datetime_merge.format(‘%d %B %Y’))], parent_value=[‘Reports’]):>

These documents would merge as: “Portfolio Report – 25 August 2019.doc

Setec Astronomy

<:=$flags(‘output_by_syntax’, value=[str($client.scenario.advice_doc_type.text), ‘_’, str($client.scenario.advice_doc_date.format(‘%d%m%Y’))], parent_value[str(anyVariable)]):>

Drawing from the options selected in a scenario wizard, this document might merge as: “Statement of Advice_11082019.doc


There are some limitations with this solution:

  • Limited to 180 characters (will truncate after this point)
  • Fields that aren’t natively strings (like multi-fields) would need to be converted into string data first or they may be ignored/result in an error.
  • Subject to windows file naming conventions and characters
  • If you declare this syntax multiple times in a document, the last one run will be the one applied to the output naming.
Back To Top