This action displays the specified document on the screen. The action has two variations:
DISPLAY DOCUMENT
AttributeIdentifier()[ USING
StringLiteral()] [ MERGE INTO ONE
][ AS XLS
][ IN ZOHO
][ IN OO
][ NEW WINDOW
][ MERGE WITH
AttributeIdentifier()]The action written in this format displays the contents of the attribute of the specified business object, provided that this attribute is of the Document type. Whatever document is stored in the attribute will be displayed – no document processing is performed. For example,
DISPLAY DOCUMENT Statement.StatementDocument
DISPLAY DOCUMENT
(Id() | StringLiteral()) [ AS MESSAGE
][ USING
StringLiteral()] [ MERGE INTO ONE
] [ NEW WINDOW
][ MERGE WITH
AttributeIdentifier()][ DELETE AFTER
INTEGER_LITERAL]where Id() or StringLiteral() is the name of the document template to be displayed. Before the document template is displayed the action calculates and fills in attribute values used inside tags in the template (see also the “Document Generation” section).
Consider the following rules:
FIND Person WHERE Person.Name='John Smith' DISPLAY DOCUMENT AccountOpeningLetter
where AccountOpeningLetter is the name of the document template. If this template has the following line:
Dear <<Person.Name>>,
it will be replaced with the line
Dear John Smith
when the template is displayed.
AS MESSAGE
keyword is specified the text of the document will be displayed in a pop-up message box. This option is only suitable for text or HTML document templates.USING
keyword. Aware IM will use the query as the data source for the document. Aware IM will produce as many documents as there are instances returned by the query. If MERGE INTO ONE
keyword is not used Aware IM will display all instances on screen (the user will have to click on an icon next to each entry to see the document). If MERGE INTO ONE
keyword is specified Aware IM will automatically merge all documents into one document and show it to the user immediately.AS XLS
keyword can be used to display reports in the XLS format rather than the default PDF formatNEW WINDOW
keyword can be used to display documents in a separate browser windowMERGE WITH
keyword can be used to merge the displayed document with any other document stored in some object in an attribute of the DOCUMENT
type (at the moment this is only supported for PDF documents), for exampleDISPLAY DOCUMENT AccountOpeningLetter MERGE WITH SystemSettings.TermsAndConditionsDoc
DELETE AFTER
keyword can be used to specify a number of seconds after which the generated document will be deleted on the server for security reasons. If not specified, the document will be deleted when the user logs out. For example to delete the document after 15 seconds use the following:DISPLAY DOCUMENT AccountOpeningLetter DELETE AFTER 15