--- title: "Show document (Event action)" slug: "doc-show-document-actor" updated: 2026-03-30T12:07:49Z published: 2026-03-30T12:07:49Z canonical: "docs.lobstersoftware.com/doc-show-document-actor" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Show document (Event action) > [!NOTE] > Event action – Abstract > > **Purpose:** Opens a single document identified by its ID in an additional browser tab, if read access for the document exists. > > > [!TIP] > > Tooltip > > > > - **Usage:** The 'Input image' is defined by a value resolver. The image information rotated by the 'angle' is stored as defined by the 'Result image' value resolver. > > - **Parameter:** Document ID (value resolver for the ID of the document displayed). > > - **Output:** Display of the document in an additional browser tab. > > > > **NOTE:** Instead of the 'Document ID' (long value), an equivalent text or an already stored document object can also be transferred. --- **NOTE:** *This event action is only available, if the functional extension module 'Document Management' is installed and licensed.* --- The event action [Show document (Event action)](/v1/docs/en/doc-show-document-actor) opens a single document identified by its ID (see [Documents](/v1/docs/en/doc-document)) in the browser, provided that read access exists for the document. - If the browser used can directly display the document content type (`contentType`) automatically determined during upload, it will appear in a new browser tab. - Otherwise, the browser can transfer the content of the document to a predefined or interactively selectable application or provide it as a download. The details depend on the browser and the user's preferences, if any. Error handling: **NOTE:** In all of the following configurations, event handling is continued. The error message only affects the output in the browser tab! | Document ID exists? | Role permissions for 'Document' | Access per ownership or permission to 'read' | Error message in the opened browser tab *► Result* | | --- | --- | --- | --- | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(8).svg) | *negligible* | *negligible* | NullPointerException ► *The event action cannot be executed without a document.* | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(9).svg) | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(8).svg) 'Read' AND ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(8).svg) 'Show details' | *negligible* | `Failed to read: Access denied: Can't access Document for Read` ► *The role does not grant read access to documents.* | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(8).svg) 'Read' AND ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(9).svg) 'Show details' | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(9).svg) | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(8).svg) | `Failed to read: Owner access denied: Can't access Document for Read` ► Read access to the document fails due to lack of ownership/approval for 'Read'*.* | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(9).svg) 'Read' | ## Configuration ![images/download/attachments/177907981/image-2024-8-13_7-46-46-version-1-modificationdate-1723528005874-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-8-13_7-46-46-version-1-modificationdate-1723528005874-api-v2.png) The value resolver for the **Document ID** parameter alternatively accepts the following return values: - A `Long` value that specifies the ID (`id`) of the document to be displayed. - A text value convertible to a `Long` value that specifies the ID (`id`) of the document to be displayed. - An entity of the 'document' type ([Documents](/v1/docs/en/doc-document)) to be displayed. **NOTE:** Even if a complete document is transferred as a data object instead of an ID, only the document content stored server-side is displayed and not the possibly differing content in the `documentContent` field of the transferred (volatile) data object. ## Example On the item level of an order, all uploaded [Documents](/v1/docs/en/doc-document) should be displayed by clicking on a 'Details' **Button**, which refer by 'reference' to the **EAN Number** (text attribute) specified for the item. On the basis of these documents (product images, PDF documents, etc.) the user should fill in further characteristics for the position (e.g. an appropriate **Goods description**). Runtime example: ![images/download/attachments/177907981/image2021-5-25_11-41-47-version-1-modificationdate-1723474966416-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-5-25_11-41-47-version-1-modificationdate-1723474966416-api-v2.png) - As soon as an **EAN Number** is available for a position, the 'Details' [Button](/v1/docs/en/fre-button-vo) appears. Whether documents have actually been uploaded for the **EAN** **Number** is not important here. - Clicking the button will search for documents related to the specified 'EAN number' and – if available and accessible within the current session – display them in additionally opened browser tabs. ![images/download/attachments/177907981/image2021-5-25_9-53-49-version-1-modificationdate-1723474966433-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-5-25_9-53-49-version-1-modificationdate-1723474966433-api-v2.png) Configuration: | Although the search necessary for document assignment and the display of any documents 'found' requires server communication, the task can be solved by a [Client Workflow](/v1/docs/en/frebehav-client-workflow). The 'showDetails' behavior is created for the [Button](/v1/docs/en/fre-button-vo) and configured as shown to the right: - As a **Triggering event** – typical for the [Button](/v1/docs/en/fre-button-vo) – [Click](/v1/docs/en/fretrigger-clicked) is selected. - Within the **Behavior type** [Client Workflow](/v1/docs/en/frebehav-client-workflow), the parameter provided by default with the **Name** 'value' is renamed 'eanNumber'. As an **Expression**, a reference to the [Text field](/v1/docs/en/custom-custom-text-field) element for the text attribute 'EAN Number' (*here*: `$el(179)`) is assigned instead of the default value (`$input`). - The [Client Workflow](/v1/docs/en/frebehav-client-workflow) presented in detail below includes all required 'activities' and also provides no feedback. In this respect, no **Actions on "true"** or **Actions on "false"** are required and the **Result** **expression** is irrelevant. **NOTE:** If no element is linked for the [Client Workflow](/v1/docs/en/frebehav-client-workflow) as shown here, in the context of an input form for purchase orders, the relevant purchase order as a whole is available as an *input value*. Without a different specification for the **Result expression**, the state of this data object processed in the [Client Workflow](/v1/docs/en/frebehav-client-workflow) is then available for the **Actions on "true"** and the **Actions on "false"**. However, no use is made of this here. | ![images/download/attachments/177907981/image2021-5-25_11-43-32-version-1-modificationdate-1723474966405-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-5-25_11-43-32-version-1-modificationdate-1723474966405-api-v2.png) | | --- | --- | A click on the 'Edit' [Button](/v1/docs/en/fre-button-vo) in the configuration for the [Client Workflow](/v1/docs/en/frebehav-client-workflow) behavior opens the associated editor: | - A **Validating rule** is actually irrelevant for the workflow. Therefore, a [Static rule](/v1/docs/en/core-static-rule) with the default condition 'true' is used here, so that the **Actions on passed rule** are executed *unconditionally*. At this point, it would be conceivable to check whether a value exists for the variable `eanNumber`, via which the value of the text attribute 'EAN number' is transferred. - Among the **Actions on passed rule**, a [Search (Event action)](/v1/docs/en/core-search-actor) is executed first, which is not described here in detail. The module label ('reference = eanNumber') refers to the 'condition' for searched [Documents](/v1/docs/en/doc-document), namely that their entry for the 'reference' (`reference`) field must completely match the value of the text attribute 'EAN number' (*here*: [Variable](/v1/docs/en/core-storage-value) `eanNumber`). The search is executed as a 'tuple search' that returns the ID (`id`) field for all [Documents](/v1/docs/en/doc-document) found as a single column ([Property projection](/v1/docs/en/core-property-projection)). The return value of the tuple search is stored as a 'search value' in the `documents` variable. - The following event action [For each loop](/v1/docs/en/core-for-each-entity-actor) iterates over the 'rows' from the 'search value', i.e. a 'list of client objects'. With each single client object [Show document (Event action)](/v1/docs/en/doc-show-document-actor) is executed, where the single [Object property](/v1/docs/en/core-property-resolver) `id` is assigned to the parameter. **NOTE:** In the example, it is assumed that the relevant 'EAN number' is specified in the 'Reference' field when uploading documents for certain articles. Whether the document was actually assigned during the upload (see [Assigning documents](/v1/docs/en/doc-documents-assign)) is irrelevant for the assignment by the [Search (Event action)](/v1/docs/en/core-search-actor) in the [Client Workflow](/v1/docs/en/frebehav-client-workflow). The 'reference' is used here – completely bypassing the actual assignment logic for documents – as a search criterion to find 'matching' documents. If necessary, an additional search criterion (e.g. for the [Document type](/v1/docs/en/doc-document-type)) could be used to prevent random finds. | ![images/download/attachments/177907981/image-2024-8-13_9-30-49-version-1-modificationdate-1723534248889-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-8-13_9-30-49-version-1-modificationdate-1723534248889-api-v2.png) | | --- | --- |