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
Table
andTableRow
elements 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.
Limitations
CJK characters included in subformSet elements may not display properly in formatted output templates.
Formatted Output and VQL
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 10
for dosage__c
.
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 10
for dosage__c
.
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 10
.
You can learn more about VQL in the Developer Portal. You can also learn about changes to VQL in the Developer Release Notes.
Accessing Template Management
Administration options are in Business Admin > Templates > 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.
Validation
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.
Subform names cannot be empty or contain any of the following characters:
! # $ % & ' ( ) * + : , / \ ; < = > ? @ [ ] ^ ` { | } ~
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. If the object has attachments enabled, two (2) options are available for this user action:
- Package and include Record Attachments with file: This includes the object record’s attachments in the download package.
- Attach file to Root Object/Object Type Record: This attaches the generated formatted output to the object record.
Permissions
If one of the above options are enabled, a user must have Edit access to the object to execute this action. If disabled, users do not require Edit access and Vault can generate formatted outputs for object records in closed or locked states.
If the object has attachment security enabled, the object lifecycle state that the user action is configured on requires the following action permissions:
- Package and include Record Attachments with file: Execute permission for the Attachments: View and Download action
- Attach file to Root Object/Object Type Record: Execute permission for the Attachments: Upload action
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 VLT__
prefix.
Name | Effect | Example |
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). |
name__v number__v
|
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 ( |
VLT__internal_investigation__vr.name__v VLT__external_investigaton__vr.name__v
|
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. |
VLTR__user__sys.first_name__sys VLTR__user__sys.last_name__sys VLTR__user__sys.name__v VLTR__user__sys.username__sys
|
Reference the time a user created an output | Displays the date and time a user generated the formatted output. |
VLTR__fo_generated_datetime
|
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. |
VLTF__attachmentsList__v
|