Document Transformations
Document Transformations in AMS allow you to convert your message into Word or PDF documents. Word files can be in either doc or docx format.
The first step is to design the format of your output document. This is done my creating a Word document in Microsoft Word and inserting Mail Merge Fields where you want data from your message to be placed. This file is then uploaded into AMS and you select a file name and type. Currently the generated document
can only be delivered as an attachment to an email.
Designing The Document Template
In order to convert messages into documents you must first supply a Word document that will be used as a template to generate new documents from. This template will be combined with the data from a message to generate the final output. The template document can be in either doc (Word 97-2003) or docx (Word 2007-2010) format.
In general the process involves inserting Mail Merge Fields where the names of the fields match the external label of the fields in the AMS Template used to create the message. When the document is processed the Merge Fields will be replaced with matching data from the message. Additionally some Mail Merge Fields are required to control the flow of message data into the document or to alter the output like inserting a checkbox for example.
Mail Merge Regions
For simple documents with no repeating areas of content you can just add mail merge fields into you document. However if you have any sections of content that repeat in your document you must surround the desired section of the document with two special merge fields. These are
<<TableStart:regionName>> and <<TableEnd:regionName>> where regionName should be replaced with the external label of either the AMS Template or List Card.
| Regions Accross Merge regions cannot span document sections. For example a region cannot span a page break. |
Once these Merge Fields have been placed you can insert Merge Fields for the data items from the message. The name of the Merge Field should match the name of the field or meta data you want inserted. If a region represents a List Card then the content of the region will be repeated for each item contained in the message for that List Card. This is how you can create a repeating set of table rows for example. More detail on how to create repeating sections is below.
| Nested Regions Currently merge regions cannot be nested. |

Inserting Mail Merge Fields
The process of inserting a Mail Merge Field is standard Microsoft Word process for your version of Office. The only extra setting required is to specify the field as being a 'Mapped Field'. In Word for Windows this is done by selecting the 'Mapped Field' option in the Field dialog box. In Word for Mac this option is not present but can be specified by following the name of the Merge Field with ' \m', notice the space before the '\'. Placing a ' \m' after the field name will work in Windows as well. The name of the fields must match the required AMS field external label exactly and is case sensitive. Similarly the regions fields are case sensitive and the 'TableStart' and 'TableEnd' must be as specified.
Word 2003 on Windows Field Menu |
Word 2003 on Windows Field Dialog |
|---|---|
|
|
Word 2008 on Mac Field Dialog |
|---|
|
Repeating Content
Normally any part of the message that contains multiple items, such as entries from a List Card, will repeat the content within its associated region. It you want to repeat rows in a table then you need to place the <<TableStart:regionName>> in the first cell before the Merge Field for the data to go in that cell and conversely place the {{<<TableEnd:regionName>>}}in the last cell after the Merge Field for data in that cell.

Inserting Checkboxes
To have a Merge Field displayed as a checkbox where it is crossed if the value is matched enter the name of the Merge Field as <<CheckBox:fieldExternalLabel_[Value To Match]>>. For example if the AMS Field is a Choice Group with external label 'inspectionResult' and possible values 'Pass' or 'Fail' to have these displayed as checkboxes add two Merge Fields with field names <<CheckBox:inspectionResult_[Pass]>> and <<CheckBox:inspectionResult_[Fail]>>. If the value to match for the checkbox contains whitespace you must insert the § symbol instead of the whitespace in the merge field. For example if the choice to match from the the form for a field with external label 'action' is 'Stock Update Requested' then the checkbox merge field should be <<CheckBox:action_[Stock§Update§Requested]>>. To enter the § on Windows this is ALT key code 0167.
Inputting Key Codes
|
Inserting Images
To insert an image, such as a signature capture via an EnterMo Case, use the field name format {<<Image:amsFieldExternalLabel>>}} e.g. <<Image:signature>>.


