View this page in the latest version of Appian. document() Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page Function document( documentId, property ) Returns property information for a document. Parameters Keyword Type Description documentId Number The Id of the document. This parameter accepts document objects as well. Document objects are represented by their Id number internally. property Text Information to retrieve for this document. Returns Text Usage considerations Using the property parameter The property parameter accepts the following case-sensitive values: dateCreated description expirationDate extension folderId folderName id knowledgeCenterId knowledgeCenterName lastUserToModify lockedBy name totalNumberOfVersions pendingApproval size (in bytes) approved changesRequireApproval url Using this function with a record field If you use a record type to manage documents, you can access most of these properties by querying the related Document record type. Note: You must have the appropriate record-level security to the document in order to access its properties. However, if you need to access the following document properties, you can use the document() function: knowledgeCenterId knowledgeCenterName lockedBy pendingApproval approved changesRequireApproval Access and update document properties before submitting a form You can use the document() function in a file upload component to allow users to immediately view and edit the properties of their uploaded documents. For example, after a user uploads a document, you can allow them to edit the file name and add a description to the document so the document has all the correct information when it's submitted. Learn how to build this example. Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to close The document() function can access the following properties for documents that have not been submitted yet: id name description extension size dateCreated Note: Only the user who uploaded the document can view and edit the document properties. If you plan to allow users to view and edit document properties in a portal, note that service accounts will also have access to the properties. Using this function with autoscaled processes Using this function in a process model with autoscale enabled may result in degraded site or application performance. It should be used with caution and tested thoroughly before deploying it for real-world use. When the application is in production, use the Autoscaled Process Activity tab to monitor how the process performs at scale. Examples Return document properties from a document management record type Record type references are specific to each environment. If you copy and paste examples with record types into an interface, it will not evaluate. Use those examples as a reference only. 1 document(ri!orderDocument[recordType!RE Order Document.fields.documentId], "knowledgeCenterName") Returns the out-of-the-box knowledge center Record Document Knowledge Center. Return document properties from a static document identifier 1 document(101,"expirationDate") Returns 12/21/05 2:28 PM GMT Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Compatible Offline Interfaces Partially compatible Can be used with offline interfaces if loaded at the top of the interface. Sync-Time Custom Record Fields Incompatible Real-Time Custom Record Fields Incompatible Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. Process Reports Incompatible Cannot be used to configure a process report. Process Events Partially compatible If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event). Process Autoscaling Partially compatible Using this function in a process model with autoscale enabled may result in degraded site or application performance. Event Consumer Filter Conditions Incompatible Cannot be used in filter conditions. Event Consumer Event Handlers Incompatible Cannot be used in event handler expressions. Feedback Was this page helpful? SHARE FEEDBACK Loading...