To allow others to generate new documents based on your template, use the Notepad: Template Button widget. You can also optionally enable exporting the resulting documents as a PDF.
After adding the Notepad: Template Button to your Workshop application, select your document template by clicking on + Select and browsing to your file. This will add your template to the Document templates list.
Next, click on the new template entry to open its configuration. First, select a Template Version. If there is no version available, open the template in a new tab and publish a template version. Selecting a version will automatically load the template's required input parameters under Template Inputs.
You can specify a Menu display name for your template when you've added more than one template to your Templates list. If you don't set a display name, the Custom text from the Button display settings will be used.
Depending on the template and its version, your Notepad template may consume multiple template inputs. For each of these inputs, link a Workshop variable of the same data type (string, number, date, timestamp, object, or object set) that you would like to use as an input to the template. The current values of these variables will be used to generate your document from the template whenever Notepad: Template Button is selected.
If your input parameter requires a single object, be sure to link it to a Workshop object set variable that contains one object.
The on-click options allow you to modify the behavior when a user uses the Notepad: Template Button:
Moreover, you can specify Workshop events or actions that should be executed when a document is created. For example, this can be used to persist the RID of the newly generated document as an object property by using the Created document output variable from the Notepad: Template Button.