Formatted output templates allow quick transfer of complete object record data into a customized template file. When you create a new formatted output template, you can configure user actions on an object record that allows users to generate and download a template file. Formatted output templates contain a total representation of the object record’s data, including its fields, related record fields, and related document fields. Formatted output templates are associated with specific objects.
About Formatted Output Templates
Formatted output templates use preconfigured XML Forms Architecture (XFA) PDF files which control the specific fonts, styles, layout, images, and Vault fields captured when the template is rendered on a document. These are forms-enabled PDF files typically created in Adobe LiveCycle Designer or Adobe AEM Forms Designer. You must create the files outside of Vault and upload them as templates.
When creating XFA PDF files to use formatted output templates:
- You must use the “Text field” field type to add a Vault field, regardless of the field’s type in your Vault. For example, include the object name by inserting a text field labeled
VLT__name__v. Vault will not accept templates with text field names that do not match object record field names in your Vault.
- You can select “Rich Text” as the Field Format to incorporate Vault’s Rich Text formatting options.
- To include images, such as your company logo, add them as image objects. Image field objects are not supported within Vault. Image objects must be flagged to embed the image in the PDF.
- Vault can support up to 150 mapped fields in the formatted output template.
- Vault supports sub-queries, such as a VQL WHERE clause on
TableRowelements of a template which represent related records. Vault groups related record information according to the query responses into specific sections of the relevant page and report outputs.
- You can use a VQL ORDER BY clause to specify the order of related records.
Here are a few suggestions to help ensure your template looks professional and functions as expected:
- Place form fields in tables so that the order and spacing of elements are preserved with field values of varying length.
- Use a custom Adobe object style to keep fonts, font sizes and weights consistent.
- Define which elements can be changed (resized, split across pages, hyphenated).
- Name all pages, master pages, tables, and table rows. Give the elements a unique name. If you’re not returning data, you can use any naming convention you prefer. Unique element names will prevent runtime and validation errors on upload.
CJK characters included in subformSet elements may not display properly in formatted output templates.
Formatted output uses VQL to generate output from your templates. Limited Release Vaults use the current Beta version of VQL and General Release Vaults use the current GA version of VQL. This means changes to VQL may affect your formatted outputs.
For example, let’s say your formatted output template includes the document number field
dosage__c. Vault executes a VQL statement to obtain the value of this field when creating your formatted output. A user enters the value
In Vault version 21R1, which uses VQL version v21.1, document Number fields display exactly as the user enters them. Your formatted output will show
In Vault version 21R2, which uses VQL version v21.2, document Number fields display with the field’s configured Decimal places. If
dosage__c is configured with Decimal places of 2, your formatted output will show
10.00 even if the user enters
Accessing Template Management
Administration options are in Admin > Business Admin > Formatted Outputs. All Admins can manage formatted output templates from this page.
How to Create Formatted Output Templates
To create a formatted output template:
- From the Formatted Outputs page, click Create Formatted Output.
- Enter the Label.
- Optional: Modify the Name. This value does not appear to end users. It is used through the API.
- Select an object from the Root Object picklist.
- If the object has object types, select an object type from the Root Object Type picklist.
- Click Choose and upload the XFA PDF. Once attached, the file name appears next to the Choose button. Vault runs an automated validation process at this time.
- Select an output format from the picklist.
- Click Save.
After you upload a template file, Vault runs an automated validation. This process checks for XFA files to ensure they meet a set of requirements for upload, for example, that the uploaded file type is supported. Once validated, the file is uploaded successfully and saved. If the validation fails, Vault delivers an error message with the reason for failure.
Note: Vault will attempt to respect all configured fonts, however, a standard font may be used for special characters.
How to Edit Formatted Output Templates
To edit a formatted output template:
- From the Formatted Outputs page, click on a template from the list.
- Click Edit.
- Make any necessary changes. You can update the template label, name, and output format. You cannot change the root object or root object type.
- Click Save.
How to Delete Formatted Output Templates
To delete a formatted output template, hover the template you wish to delete and click the red (x) button. From the Delete Formatted Output Template window, click Continue. You can also click on a template and click the Delete button.
Configuring the User Action to Download Formatted Output Template
You can configure the Download Formatted Output user action on object lifecycle states to allow users to download a formatted output template. With this user action, you can set up the following:
- Select from a list of configured formatted output templates to download.
- Package and include Record Attachments with file: This attaches a generated packaged to the record when completed. Requires Edit permission.
- Attach file to Root Object/Object Type Record: This option is only available if the object associated with the template supports attachments. Requires Edit permission.
If you choose not to attach the file on the record, users won’t need Edit access to generate the output. This allows Vault to generate the output for object records in closed or locked states.
Field Reference Syntax
You set up XFA PDF files to reference values on the root object field, related object record fields, and related documents fields. For each of these, there is a specific syntax you must use, which follows the VQL standard pattern. All text fields must begin with the
|Reference a specific object field on the root object||Reference name and number of the Audit object (the object of the record from which you ran the report).||
|Reference a specific field on an object related to the root object by one or more references for a repeating element||
Obtain the names of each investigation associated with an audit based on the following:
The Audit object has an inbound relationship with the Internal Investigations (
|Reference a field on a document related to the root object by one or more references for a repeating element||
Obtain the document number of each document associated with a product based on the following:
A Product Suite with a Product (related via product suite’s inbound relationship
|Reference the user that created the output||Displays the name and username of the user that generated the formatted output.||
|Reference the time a user created an output||Displays the date and time a user generated the formatted output.||
|Reference a list of attachments on a record||Displays a list of attachments on the root record. Each attachment is displayed on a separate line within the assigned text field. Note that this token cannot be used to display attachments on records other than the root record.||