Skip to main content
Version: 1.3.2

Document Template with Tags

HRMS allows you to create document templates with tags for downloading the final document, where the tags will be replaced with the necessary values.

The final document can be downloaded from any table of the agent interface by clicking the Generate document button if the form layout configuration includes the Generate document widget.

In the out-of-the-box version, the widget is available only on the Plan an absence portal page for requesting a vacation or unpaid vacation and on the Resign or terminate an employee page.

The information on templates is stored in the Document Template (hrm_company_document) table.

tip

Roles required:

  • Read – hrm_agent, hrm_supervisor.
  • Create, edit – hrm_manager.
  • Delete – users with the hrm_manager role can delete only the records created by them, users with the hrm_admin role can delete any records.
  • Download document – an employee can download a document from a table or model if the template that specifies this table or model also specifies the employee's company. This requirement does not apply to the Employment Change (hrm_employment_change) table, where downloading documents is available to all users who can view the table's form.

Create a document template with tags​


To create a document template record, complete the following steps:

  1. Navigate to Human Resource Management → Registers → Document Templates.
  2. Click New in the upper-left corner of the page and fill in the required fields.
  3. (optional) Create new tags. To do this, click the icon next to the Tags field and fill in the required fields in the modal window that opens. Then, click Save to apply the changes and close the modal window. Repeat this step for each new tag.
  4. Click Save or Save and exit to apply the changes on the template form.
  5. Copy the tags from the Template Design Hints* section and embed them in a .DOCX file.
  6. Attach just one file with tags by dragging it into the attachment window or by clicking Upload from your device and selecting the file from your device.

Publish a template​

To make a template public for an unlimited time, you must publish its attachment. To do so, click Publish attachment on the template's form. Read more in the Attachment Recommendations article.

Document Template form fields​

FieldMandatoryDescription
TitleYSpecify the name of the template.
CompanyYSpecify the company that will use the template.
Place of generationYSpecify where the template will be generated. Available options:
  • Model – default value
  • Table
ModelYSpecify the model where the template will be generated. The field is displayed if the Place of generation value is Model.
TableYSpecify the table where the template will be generated. The field is displayed if the Place of generation value is Table.
TagsNSpecify the tags to be used in the template. The field is displayed if the Model and Table fields are completed.
ConditionsNSpecify any additional conditions to be considered when searching for a document template.

If the Place of generation value is Model, you must specify only one condition for the model attribute. The condition refers to the table specified in the selected model.

If the Place of generation value is Table, you can specify multiple conditions. The conditions refer to the table specified in the template.

Tags modal window fields​

FieldMandatoryDescription
DescriptionNAdd a description of the tag.
Generate by parameterNSelect the checkbox if you want the final document to display the values of a model's attribute or table's column. The checkbox is selected by default.
Source of generationNSpecify where the template will be generated. Available options:
  • Model – default value
  • Table
The field is automatically completed if the Generate by parameter checkbox is selected.
ModelY/NSpecify the model where the template will be generated. The field is automatically completed if the Generate by parameter checkbox is selected.
AttributeY/NSpecify the attribute whose value will be used in the final document instead of the template's tag. The field is displayed and is mandatory if the Source of generation value is Model.
TableY/NSpecify the table where the template will be generated. The field is automatically completed if the Generate by parameter checkbox is selected.
ColumnY/NSpecify the column whose value will be used in the final document instead of the template's tag. The field is displayed and is mandatory if the Source of generation value is Table.
ActiveNSelect the checkbox to make the tag active.
Use scriptN

Select the checkbox to display the Script field where you can specify a script for the tag.

If you clear the checkbox after inserting a script, the script is not applied to the tag.

ScriptY/NInsert the script to be used instead of the tag in the final document. This field is displayed and is mandatory if the Use script checkbox is selected.