Fieldpine Logo Documentation Home  

Document Conversion


To define the appearance of documents such as emails and statements, Fieldpine uses a template file that specifies how the document should be presented and what information is to be displayed. This means you have large amounts of freedom to create documents and branding to suit your own requirements.

document process flow

When the system needs to create a document, such as a statement for a customer, it opens the definition "format template" and performs a mail merge like operation inserting the information you want to appear. This insertion operation is very powerful and allows you to insert complex items such as repeating tables (ie A list of sales and items on each sale)

Output documents can be in different formats such as Emails (HTML and/or txt), PDF documents or Word documents. Each of these output types has different abilities so not all output formats will appear exactly as defined in the template. As Word is a very complex product internally the output formats cannot reproduce every feature Word supports. Word Art (a way of inserting stylised text in a Word document) is not supported at all and simply ignore if encountered, as an alternative insert a picture containing the Word Art. Fonts can also cause problems - Word often installs additional fonts but these are not always available on the systems that finally receive the document.

Using Microsoft Word for Templates

Many document templates are defined using Microsoft Word stored in "DOCX" format. You cannot use Word documents stored in the older ".DOC" format. You do not need Word to use Message Format files, you only need it for editing the formats. If you do not have Word you can also use Open Document but this does not yet support all the features of using Word.

The following picture shows a sample of a simple purchase order, open in Word with Comments enabled, and with some specific elements highlighted in red. Static elements such as the title are keyed in the format you wish them to be, placed where you want them.

Literal text, such as the words "Purchase Order" are placed on the output document as close as possible to how they appear in Word

Simple symbol substitutions, as shown in #1 (red), cause the generating system to extract the value of defined field name and insert it into the document.

In the example, the system fetchs the suppliercomments information and inserts into the cell. There are large numbers of these fields that can be inserted. Refer to the documentation for each object (sale, customer, etc) to see the list of available attributes

Note how the suppliercomments field is highlighted in bold. Any formatting applied to the tags themselves, such as bold, italic, underline will be applied to the output generated

Often you wish to control how information is presented, and example #2 (red) shows a format specification. This specification instructs the system on exactly how the field is to be presented. The example field is a date and time value, and this format specification is saying "format as a date, and do not display any time information".

The first two examples, #1 and #2, are showing inline symbols. These are great when the symbol names themselves do not affect the layout of the page, but when inserting very small fields or tables these long names can make reading the document hard. To solve this you can insert comments in Word and the comment contains the format specifications.

Example #3 (red) shows a format specification inserted via a comment. The main word document has a "#" sign which is linked to the comment. When the document is read, the comment values are inserted instead of the "#" sign. The use of comments is optional and only exists to make reading an using documents easier to understand, there is no technical difference between using comments or the inline method

Additionally, #3 is showing the use of a repeating value. "purchaseorder.item[].linenum" is the symbol that selects the linenum value for the current item being rendered. As the system repeats for each item on the purchase order this symbol changes value