Document Viewer Component

Document Viewer

Function: a!documentViewerField()

Displays a document from document management on an interface.

Parameters

Name Keyword Type Description
Label label Text Optional text to display as the field label.
Label Position labelPosition Text Optional text to determine where the label appears. Valid values include
  • "ABOVE" (default) Displays the label above the component.
  • "ADJACENT" Displays the label to the left of the component.
  • "COLLAPSED" Hides the label. The label will still be read by screen readers; see accessibility considerations for more information.
  • "JUSTIFIED" Aligns the label alongside the component starting at the edge of the page.
Instructions instructions Text Optional text displayed below the label.
Help Tooltip helpTooltip Text Displays a help icon with the specified text as a tooltip. The tooltip displays a maximum of 500 characters. The help icon does not show when the label position is "COLLAPSED".
Document document Document The document to display.
Alternative Text altText Text Equivalent alternate text provided to assistive technology.
Visibility showWhen Boolean Determines whether the component is displayed on the interface. When set to false, the component is hidden and is not evaluated. Default: false.
Height height Text Determines the field height. Valid values include "SHORT", "MEDIUM" (default), and "TALL".
Disabled disabled Boolean Determines if the user is prevented from interacting with the document. Default is false.

Notes

  • Document viewing behavior differs depending on the document type and browser. Some browsers may render documents inline, while other browsers or file types may be downloaded. Browser plug-ins or extensions may impact this behavior. Consider the browsers that your users will be using to access your application.
    • Example: PDF documents are displayed inline in Chrome, Firefox, Safari, and Edge, but are downloaded by default in Internet Explorer 11.
  • On Appian for Mobile Devices, the document viewer component appears as a document download link. The value provided in altText is used for the link label.
  • Document not available will be displayed if the document is invalid, has been deleted, or the user does not have access to view it.
  • For security purposes, documents are loaded using the static content URL. Missing system configuration will be displayed if this domain is not configured on your Appian instance. Refer to Post-Install Configurations for more details on this configuration.
  • This component displays documents stored in Appian. To display documents from another system use the Web Content Field.
  • This component is not intended for displaying images or videos. To display an image from a document in Appian use a Document Image. To display a video use a Video Field.

Examples

Copy and paste an example into the INTERFACE DEFINITION in EXPRESSION MODE to see it displayed. Replace the document field value with a valid document in your environment.

1
2
3
4
5
6
7
8
{
  a!documentViewerField(
    label: "Appian Whitepaper",
    document: 282578,
    height: "TALL",
    altText: "5 Digital Transformation Predictions for 2018 and Beyond"
  )
}
FEEDBACK