Hello, how can we help you?

Recent Searches: How to use variables in SoftExpert Document - Managing contracts using variables - SCIM provisioning - Monitoring system synchronizations - LDAP

How to use variables in SoftExpert Document

 

Prerequisites

  • Document in a category configured with conversion to .pdf.
  • File in .docx format.

 

Introduction

Using variables in SoftExpert Document allows the system to automatically insert information into files, dispensing with the need to manually edit each field.

This feature contributes to content standardization, reduces typing efforts, and expedites document drafting, especially in high-volume scenarios.

Additionally, variables can be applied to tables, enabling the dynamic generation of lines according to the amount of available data.

This way, it is possible to create a single document template and have the system automatically expand the table, comprehending all necessary records.

Outstanding application examples include tables with a list of revision participants, change history, etc.

This resource is exclusive to customers that use the SoftExpert Suite cloud platform.

 

 

Using variables in documents

1. Access the Electronic file tab of a document and click on the View available variables button.

On this screen, it is possible to view the data of the following columns:

  • Variable: presents the variable that must be copied to the .docx file so that it is filled in automatically. Example of its format: {d.document.author}.
  • Description: describes what the variable represents. In the {d.document.author} example, it represents the document's author.
  • Data type: indicates whether the data is a text, a list, a date, etc.
  • Actions: displays the button that allows for copying the variable.

2. Click on the Copy button of a variable and paste it to the .docx file. For example, if you wish to add the document author variable to the file, it is possible to build the text as follows: "Document author: {d.document.author}."

3. Associate the .docx file with the document.

4. In the Actions column of the associated file, click on More and on List file variables.

  • When this option is used, the system scans the .docx file to identify all the variables, reporting which ones are correct and for which ones no matches were found.
  • If the file has incompatible variables, click again on the View available variables option and check if the variable was copied correctly. If necessary, delete the variable from your file and paste it again. Make sure it is identical to the variable shown in the system.
 

5. Now, when your file is converted to .pdf automatically or manually, the variables will be filled in with the value identified by the system.

 

Advanced resources

The great advantage of using these variables is the possibility of creating tables inside your .docx file, so that lines are generated automatically, according to the amount of available data. See some examples and instructions:

Example 1: List of document drafters

To have a table of this type in the file:

Drafter Department Position Date Time
Joseph Jones Quality Analyst II 02/07/2025 12:31:12PM
Mary Anne Production Supervisor 02/17/2025 11:22:22AM
Bella Rose Quality Coordinator 03/09/2025 05:20:45PM
John Smith Development Director 03/18/2025 08:46:56PM

Configure the variables as follows:

Drafter Department Position Date Time
{d.document.revision.drafter[i].userName} {d.document.revision.drafter[i].department} {d.document.revision.drafter[i].function} {d.document.revision.drafter[i].date} {d.document.revision.drafter[i].time}
{d.document.revision.drafter[i+1].userName} {d.document.revision.drafter[i+1].department} {d.document.revision.drafter[i+1].function} {d.document.revision.drafter[i+1].date} {d.document.revision.drafter[i+1].time}

 

Example 2: List with all revision participants

It is also possible to build a table of this type:

Participant Date Time User Department Position
Drafter 02/07/2025 12:31:12PM Joseph Jones Quality Analyst II
Reviewer 02/17/2025 11:22:22AM Mary Anne Production Supervisor
Reviewer 02/17/2025 03:45:23PM Bella Rose Quality Coordinator
Approver 03/09/2025 09:34:33AM Mary Anne Production Supervisor
Approver 03/10/2025 02:23:44PM Bella Rose Quality Coordinator
Releaser 03/18/2025 08:46:56PM John Smith Development Director

To this end, configure the variables as follows:

Participant Date Time User Department Position
Drafter {d.document.revision.drafter[i].date} {d.document.revision.drafter[i].time} {d.document.revision.drafter[i].userName} {d.document.revision.drafter[i].department} {d.document.revision.drafter[i].function}
{d.document.revision.drafter[i+1].date} {d.document.revision.drafter[i+1].time} {d.document.revision.drafter[i+1].userName} {d.document.revision.drafter[i+1].department} {d.document.revision.drafter[i+1].function}
Reviewer {d.document.revision.reviewer[i].date} {d.document.revision.reviewer[i].time} {d.document.revision.reviewer[i].userName} {d.document.revision.reviewer[i].department} {d.document.revision.reviewer[i].function}
{d.document.revision.reviewer[i+1].date} {d.document.revision.reviewer[i+1].time} {d.document.revision.reviewer[i+1].userName} {d.document.revision.reviewer[i+1].department} {d.document.revision.reviewer[i+1].function}
Approver {d.document.revision.approver[i].date} {d.document.revision.approver[i].time} {d.document.revision.approver[i].userName} {d.document.revision.approver[i].department} {d.document.revision.approver[i].function}
{d.document.revision.approver[i+1].date} {d.document.revision.approver[i+1].time} {d.document.revision.approver[i+1].userName} {d.document.revision.approver[i+1].department} {d.document.revision.approver[i+1].function}
Releaser {d.document.revision.releaser[i].date} {d.document.revision.releaser[i].time} {d.document.revision.releaser[i].userName} {d.document.revision.releaser[i].department} {d.document.revision.releaser[i].function}
{d.document.revision.releaser[i+1].date} {d.document.revision.releaser[i+1].time} {d.document.revision.releaser[i+1].userName} {d.document.revision.releaser[i+1].department} {d.document.revision.releaser[i+1].function}

 

Example 3: Change history

It is possible to display a table with the change history, as shown in the example below:

Date User Change Location Revision
02/07/2025 Bella Rose Section title changed. Page 1 01
02/17/2025 John Smith New information security requirements added. Pages 10 and 11 01
03/09/2025 Joseph Jones Spelling mistake fixed. Page 22 01
03/18/2025 Mary Anne Logo changed with the company's new identity. All pages 01

To this end, configure the variables as follows:

Date User Change Location Revision
{d.document.revision.changeHistory[i].date} {d.document.revision.changeHistory[i].userName} {d.document.revision.changeHistory[i].description} {d.document.revision.changeHistory[i].location} {d.document.revision.changeHistory[i].revisionId}
{d.document.revision.changeHistory[i+1].date} {d.document.revision.changeHistory[i+1].userName} {d.document.revision.changeHistory[i+1].description} {d.document.revision.changeHistory[i+1].location} {d.document.revision.changeHistory[i+1].revisionId}

 

Special characters

Avoid placing special characters in the identifiers of attributes, Workflow activities, and form fields.

The variables follow a standardized format and represent document data. See some examples:

Document author: {d.document.author}

Document category: {d.document.category.name}

Document attributes: {d.document.attribute.attribute}

In the case above, the second “attribute” (highlighted in yellow) will always be replaced with the ID # of the attribute recorded in the system. Therefore, be extra careful!

When using the {d.document.attribute.attribute} format, it is important to make sure that the attribute ID # does not contain any special characters, such as ! @ # $ % ^ & * ( ) + = [ ] { } ; : ' " , . < > / ? \ | and spaces.

That is because the system interprets the characters as a level separation inside the object, or even as a function that must be executed. That is, if you create an attribute with the my.attribute ID #, for example, the system may understand that you are trying to access something like d.document.attribute.my.attribute, generating a failure in the conversion.

This same recommendation applies to Workflow activities and form fields.

Good practices

  • Use attribute, Workflow activity, and form field ID #s without special characters.
  • Always test the file after adding variables in order to ensure that they are filled in correctly.
 

 

Frequently asked questions

1. Do I need to memorize the variables?

No. You can always have the full list of variables at hand by accessing the electronic file tab of a document and clicking on the "View available variables".

2. Can I use the variables without the curly brackets {} or in another format?

No. The filling process will only work if the variable inside the file is exactly the same as the one shown when you click on the "View available variables".

3. Can I use a variable that is not being shown in "View available variables"?

No. As stated before, only variables already available can be used.

4. The document category does not have the .pdf conversion configuration, can I use the variables regardless?

No. The variables are filled in during the conversion to .pdf. Therefore, without the conversion, the variables will not be filled in.

5. Can I use docvariables and variables in the same file?

Yes. If you have the metadata configuration in the category, but wish to use a new variables resource, you can use both formats in your file. During the conversion process, both the docvariables and variables will be filled in.

6. Do the variables also work for files with other formats, such as .doc or .xlsx?

No. Variable filling will be applied only to files with .docx extension.

7. Can I use the same variable more than once in the file?

Yes. You can use as many as you wish.

8. What happens if there is no data to be inserted in the variable? For example, I added a variable of a form field, but this field is blank, it was not filled in.

The variable will be replaced with a blank space.

9. What happens if my document has a variable referring to an attribute that is not associated with my document?

Through the "List file variables" option, it is possible to view each one of the variables found inside the file. This option is located in the "Actions" column, in the files of the "Electronic file" tab of the document. With this option, it is also possible to identify which of the variables do not have a match in the system. Therefore, if you have a variable referring to an attribute that is no longer associated with the document, you can identify said variable with the "List file variables" option and then edit the file in order to make the necessary adjustment.

10. What happens if I have an approvers table, but my document does not have the approval step?

Your table will stay blank.

 

Conclusion

The variables feature provides greater flexibility and automation in SoftExpert Document, making the document drafting process more precise, standardized, and time-saving.

When variables are used in fields or tables, it is ensured that information will be updated consistently and reliably, which results in a process that is more efficient and less susceptible to manual errors.


Was this article helpful?