Document Viewer Field
A Document Viewer shows a document on the form for internal users. Use it to put a document beside the fields being filled in from it - an invoice next to the coding fields, a form next to the record it belongs to, a contract next to the approval questions.
Choosing the document
There are three ways to say which document to show, from broadest to most exact.
Category to View, Subcategory to View and Document Name to View - Show the document in the record that matches these. Fill in as many as are needed to identify it; leaving them all blank shows the record's documents generally.
From Record ID - The record the documents come from. Leave it blank to use the record the form is open in, which is what most forms want. Set it - usually from a field the user's last click filled in - to view documents from a different record.
Direct Document ID - The exact document to show. Setting this makes the other settings unnecessary, since it points at one document directly.
The three work together: the Record ID says which record, the category settings narrow it down within that record, and a Direct Document ID skips both.
Advanced
Open Document When E-form Loads - Opens the document as the form loads. Turn it off where the document is only wanted once the user has chosen something, so the form is not fetching a document nobody asked for.
Allow Annotations - Lets the user annotate the document from the form. Leave it off for a viewer that is only there to be read.
Building a viewer screen
The common arrangement is a Search Results field, a Document Viewer, and a field in between. Set the Search Results field's click action to Set Field Value, point it at a field, and set the viewer's From Record ID to that same field: clicking a row then shows that record's document. Put the two in a Split Columns container and the user can resize the divide between the list and the document.
Where the record has several documents worth choosing between, add a Document List instead of relying on the category settings - it gives the user a clickable list to pick from and pairs with this field.
The Document Viewer Field Actions in the shared action list drive the viewer from elsewhere on the form, and the Refresh Form Data action picks up a document that has been added since the form opened.
For a form used by people outside the organization, use the Public Document Viewer instead - this field only works for signed-in internal users.