Version 1 (classic)
.docx templates on version 1: variables detected automatically from the Word file and plain text replacement.
This guide describes the .docx Templates module for templates created on version 1. Variables are detected automatically from the uploaded Word file, and generation performs a text replacement: each variable in the document is replaced with its corresponding value.
Important A template's version is chosen once, at creation, and cannot be changed afterwards — the version selector disappears from the settings screen once the template has been saved. For new templates, version 2 is recommended.
1. How version 1 works
The full flow, in order:
- Create the template and choose Version 1.
- Upload the
.docxfile in which you wrote the variables in the form{{NUME_VARIABILA}}. - On upload, the application scans the file automatically and extracts every variable it finds. The list appears in the Form tab.
- For each detected variable, configure a label, whether it is required, and its input type (text, number, list, date, series, etc.).
- When the document is generated for an employee, the predefined variables fill themselves in from platform data, and the rest are asked in the form.
- Each variable is replaced with the corresponding text. The result is the final document.
The key consequence: variables cannot be added manually from the interface. They appear in the table only if they physically exist in the Word file. If you add a new variable to the document, you must re-upload the file for the application to detect it.
2. The template list
The module's main page displays all the .docx templates in the organisation, with these columns:
| Column | Meaning |
|---|---|
| Title | the document name |
| File | whether a file has been uploaded |
| Form | shows the label "Vers. 1" / "Version 1 (read-only)" |
| Signers | the number of configured signers |
From each row's action menu (the three-dot icon):
- Form — the list of detected variables and their configuration
- Signers — who signs the generated document
- File — uploading or replacing the .docx file
- Generate — opens the generation screen for employees
- Settings — title, validity, automatic approval
- Delete — deleting the template
3. Creating a template
Press the add button and fill in:
| Field | Description |
|---|---|
| Document title | the document name. It must be unique — otherwise the error "Titlul este deja folosit" (the title is already in use) appears. |
| Validity (number of days from completion) | after how many days the generated document expires. Leave 0 for unlimited. |
| DOCX form version | choose Version 1. Note: after saving, this option no longer appears and can no longer be changed. |
| automatically approved after signing | if ticked, the document approves itself as soon as it has been signed by all signers. |
4. Template settings
Reached from the template menu → Settings. These can be changed later:
- Document title
- Validity — the number of days the generated document is valid for
- automatically approved after signing
5. Uploading the .docx file
From the template menu → File.
- Both
.docxand.pdffiles are accepted. - A PDF file is a fixed document: it contains no variables and has no form — it is only attached and signed. For a PDF template, the Form option in the menu is disabled.
- Every time a
.docxfile is uploaded, the application rescans the document and updates the variable list.
Recommendation: before uploading the file, check that all variables are spelled correctly. If a variable is missing from the list after upload, it is most likely mistyped in the document (see the next section).
6. Variable syntax in the Word document
Version 1 has a single kind of element: the simple variable.
{{NUME_VARIABILA}}Rules:
- The delimiters are exactly two braces at the start and two braces at the end:
{{and}}. - No spaces inside:
{{NUME}}is correct,{{ NUME }}is not recognised. - Variable names are best written in UPPERCASE with
_instead of spaces, without diacritics:{{DATA_INFORMARII}},{{NUMAR_ORE}}. - The same variable can appear several times in the document — every occurrence is filled with the same value.
- Word can "break" a tag into several internal fragments if you edit it partially, let autocorrect change it, or format only part of it. If a variable is not detected even though it looks correct, delete it completely and retype it in one go, with uniform formatting.
Unsupported markers. Do not use blocks or sections of the form {{#VARIABILA}} … {{/VARIABILA}}, repeatable table row markers, conditional display markers, or expressions and calculations inside the braces ({{PRET*1.19}}, {{DATA | format}}). All of these remain as literal text in the final document. If you need them, use version 2. Automatic document numbering is done through the Series input type, described in section 8.
7. Predefined variables (filled in automatically)
The following variables are recognised by the platform and filled in automatically from the data of the employee the document is generated for. They do not appear as questions in the form.
| Variable | Filled in with |
|---|---|
{{NUME}} | the employee's full name |
{{EMAIL}} | the employee's email address |
{{CNP}} | the employee's personal numeric code (CNP) |
{{ADRESA}} | the employee's full address |
{{MARCA}} | the employee's ID number |
{{DEPARTAMENT}} | the employee's department |
{{POST}} | the employee's position |
{{FUNCTIE}} | the employee's COR occupation |
{{CLM}} | the name of the workplace supervisor; if the employee has no supervisor assigned, the company administrator is used |
{{AUTOR}} | the name of the document's author (the user who initiated the generation) |
{{LOCALITATE}} | the employee's town |
{{JUDET}} | the employee's county |
{{CALIFICARE}} | the employee's qualification |
{{AUTORIZATII}} | the employee's authorisations |
{{STUDII}} | the employee's education |
{{CI_SERIE}} | the ID card series |
{{CI_NUMAR}} | the ID card number |
{{CI_EMIS}} | the ID card issue date |
{{CI_EXPIRA}} | the ID card expiry date |
{{CI_ELIBERAT}} | the institution that issued the ID card |
{{DATA}} | today's date, in dd-mm-yyyy format |
Note: these variable names must be written exactly as in the table. A variant such as
{{NUME_ANGAJAT}}or{{Nume}}is not recognised as a predefined variable and will become a question to fill in manually in the form.Any other variable in the document that does not appear in the table above automatically becomes a question in the form, which you configure in the Form tab.
8. Configuring form variables
From the template menu → Form. The table shows, for each detected variable: Variable, Label, Required, and Type.
Click a variable to open the "Variable settings" screen:
| Option | Description |
|---|---|
| Label in the form | the text shown to whoever fills the form in. Required — otherwise "Trebuie sa introduci un titlu pentru variabila." (you must enter a title for the variable) appears. |
| required | if ticked, the document cannot be generated without this value |
| displayed inline | shows the field at reduced width, so that several fields fit on the same line in the form. It has no effect whatsoever on the generated document. |
| cannot be edited | the field is read-only for whoever fills the form in. It cannot be ticked for the Series type. |
| Input type | see the table below |
Input types
| Type | Description | What goes into the document |
|---|---|---|
| Text | free text field | the entered text |
| Number | numeric field | the entered number |
| Select | list of predefined options; at least 2 options, otherwise "Trebuie sa adaugi minim 2 optiuni pentru select." (you must add at least 2 options for a select) appears | the chosen option |
| Checkbox | several tickable options | the ticked options, concatenated and separated by commas |
| Date | not asked of the user; filled in automatically with today's date + the configured number of days in advance | the computed date, in yyyy-mm-dd format |
| Series | a record counter that increments automatically with each generated document | the current value of the series |
Options (Select / Checkbox). They are added one at a time, in the Option field + the Add button. A duplicate option is rejected with the message "Optiunea este deja adaugata sau nu este specificata" (the option is already added or is not specified).
Series. The Current series field takes the value the numbering starts from. Accepted examples: AAA0001, 00001, 1. With each generated document the value increases automatically (AAA0001 → AAA0002 → …). Entering a series is mandatory: "Trebuie sa introduci o serie." (you must enter a series).
Date. The "Default value is today's date" field takes the number of days added to the current date (+ number of days in advance). For 0, today's date is used.
The two date formats differ: the predefined variable
{{DATA}}writesdd-mm-yyyy, whereas a Date field writesyyyy-mm-dd. If you need a uniform format, use only one of the two mechanisms in the same document.
9. Variables that no longer exist in the file
If you re-upload the .docx file and a previously configured variable no longer appears in the document, it is not deleted automatically. It stays in the table, shown in red, with the message:
Aceasta variabila nu a mai fost gasita in fisier. (this variable was no longer found in the file)
This way you do not lose the configuration if you uploaded the wrong version of the file by mistake. Only variables flagged this way can be deleted manually, with the delete button on that row.
10. Signers
From the template menu → Signers.
In version 1, under the heading "The generated document will be signed, in order, by:", four checkboxes are available:
| Checkbox | Who signs |
|---|---|
| Employee | the employee the document was generated for |
| Workplace supervisor | the employee's workplace supervisor; if there is none, the company administrator |
| Document author | the user who initiated the generation |
| Company administrator | the organisation's administrator |
Below these, the "and by the following signers:" section allows adding extra signers.
Signature boxes are placed automatically in the generated document, in the order of the signers.
11. Generating the document
The document is generated from Generate (or from the employee's documents screen). Whoever fills it in sees the form built from the configured variables:
- the predefined variables (section 7) are already filled in;
- Date and Series fields fill themselves in, with no intervention;
- the remaining fields are filled in manually, respecting the required flag.
On save, the application replaces all the variables and attaches the resulting document to the employee's file, with today as the start date and an end date computed from Validity. The document is then sent for signing to the configured signers.
If the template has "automatically approved after signing" ticked, the document is approved automatically once fully signed.
12. Limitations
| Limitation | Detail |
|---|---|
| No repetition | you cannot generate a table with a variable number of rows |
| No conditions | you cannot show/hide a paragraph based on an answer |
| No steps | the form is a flat list of fields, with no sections |
| No history | form answers are not kept and cannot be exported to Excel |
| No multiple files | you cannot use a different .docx file depending on the employee's COR occupation |
| Variables only from the file | a variable cannot be added from the interface; it must be written in the document and the file re-uploaded |
| Minimal validation | the application does not check whether a variable is spelled correctly; a mistyped variable simply does not appear in the list |
All of these limitations are removed in version 2. An existing template cannot be migrated — it has to be recreated on version 2.
13. Common errors
| Symptom / message | Likely cause | Solution |
|---|---|---|
| A variable does not appear in the Form tab | mistyped (single braces, spaces inside, tag broken by Word) | retype the variable in one go, with uniform formatting, and re-upload the file |
| "Document invalid" | the document could not be processed by the generation engine | check that the file is a valid .docx, open it and save it again from Word, then re-upload |
| "Fisierul docx nu exista" / "Template docx lipsa" (the docx file does not exist / the docx template is missing) | no file has been uploaded to the template | upload the file from the File menu |
| "Titlul este deja folosit" (the title is already in use) | a template with the same title already exists | choose a different title |
| "Trebuie sa adaugi minim 2 optiuni pentru select." (you must add at least 2 options for a select) | a Select/Checkbox type without enough options | add at least two options |
| "Trebuie sa introduci o serie." (you must enter a series) | a Series type without a starting value | fill in Current series (e.g. AAA0001) |
| A variable is shown in red | it no longer exists in the uploaded file | either add it back into the document and re-upload the file, or delete it from the table |
| The text "valoare lipsa" (value missing) appears in the document | a predefined variable could not be resolved | check that the employee has that field filled in on their record |
14. Deleting a template
From the template menu → Delete.
The confirmation warns: "vei sterge acest tip de document si nu va mai exista in filtre si rapoarte! Operatia este ireversibila." (you will delete this document type and it will no longer exist in filters and reports! The operation is irreversible.)
A template cannot be deleted if it already has generated documents or attached files. If the template has a file collection, the message "Șterge mai întâi colecția de fișiere din Gestiunea fisierelor" (delete the file collection from File Management first) appears.