This guide provides a general description of our smart fields and their functionalities.

Smart fields in general

Smart fields are data fields that can be inserted in templates and enable writers to add data (numbers, text, dates, etc) at a specific place in a document. Using smart fields will enable you to collaborate on static pieces of text and save time when working on documents. Time savings are gained by using identical smart fields multiple times in your template. Each identical smart field is filled out automatically throughout the document when data is added to the smart field. Smart fields enable you to personalize your documents by for example using smart fields like:

{{client_name}} {{partnership_type}} {{client_id}} {{invoice_number}}

When are smart fields useful?

Smart fields are useful in cases like:

A) Smart fields are useful when writers of a document are only allowed to modify certain words but not the whole text. By using smart fields, you can collaborate on document-level by allowing writers to add and edit short terms or words in uneditable texts.

B) Smart fields are useful when a certain term (example: {{client_name}}) appears in several places in one document. With the help of the smart fields, document writers only have to fill in a smart field once and in all other places in the document the data will be inserted data automatically.

Smart fields in templates

1. Creation of smart fields

The creation of smart fields can be done in two ways:

1A) You can automatically create a smart field while typing in a template, using double brackets to open and close the smart field name: {{name_of_smartfield}}. When doing so, it is advised to only use lower-case letters. Example:


    When typing {{client_id}} in a template, it will automatically convert to a textual smart field looking like this:


1B) You can create smart fields by selecting text and pressing the lightning button in the editor. You will now add smart fields by pressing the lightning symbol in the editor.

If you have selected text before pressing the lightning symbol, the selected text will automatically be converted into a textual smart field. By clicking on the smart field again, you can edit the smart field's name and type.

2. Types of smart fields

Using smart fields to collaborate on static text blocks can be done in a couple of different ways. Docflow supports 5 different types of smart fields:

A) Textual smart fields to add either text or numeric values (or a combination).

B) Numeric smart fields to add numeric values only. 

C) Date smart fields to add dates only.

D) Email smart fields to add email addresses.

E) The single-choice smart fields allowing document writers to choose an option from a number of options.

Changing the type of smart field is done by: 

1. Clicking on the smart field of interest

2. Clicking on the icon at the left of the smart field name

3. Choose the type of smart field 

3. Default values in smart fields

Smart fields also support default values. Default values are instantly and automatically inserted into the smart fields after document creation. Subsequently, smart fields with default values are colored green immediately after the document is created. The green color tells document writers the smart fields have been filled in. If necessary, default values can be overridden by writers on the document level. 

Example: Company_name is by default Docflow bv

4. Formulas in numeric smart fields

Numeric smart fields allow the creation of basic formulas. Open up a numeric smart field and press Calculate to insert a formula. Creating a formula can be done by using: (1) References of smart fields, (2) numbers, and (3) mathematical characters.

Example: The total amount of tax on an invoice is 21% of the total invoice.
Therefore, the formula becomes: total_invoice * 0.21. 

In the formula of this example, total_invoice is a reference to the smart field Total invoiceThese references can be found and copied by clicking on the smart field of interest in the template or sidebar.

5. Smart fields sidebar

By clicking on the lightning icon in the top navigation bar of the template, you can open up the smart fields sidebar. 

This sidebar gives you an overview of all smart fields in the template. 

From here you can easily copy and paste smart fields into the template, to create more smart fields. 

6. Conditional logic based on smart fields

Smart fields form the basis of conditional logic rules. Conditional logic enables you to hide and show certain blocks based on the values of smart fields. You can learn more about this in this knowledge article. 

Smart fields in Documents

1. Adding data to smart fields 

Adding data to a smart field on a document level can be done with ease. Simply click on the smart field of interest and start typing. After inserting data into a smart field, it will color green. This gives you a quick overview of the smart fields that have been filled out (green) and still need to be filled out (blue). 

2. Calculations with smart fields

As mentioned above, it is possible to create formulas using numeric smart fields. Formulas make it easier to quickly and correctly fill out smart fields in documents. In fact, smart fields based on formulas are filled in automatically. On document-level you can recognize these automated numeric smart fields by their grey color.

There is no need to insert data into these grey-colored smart fields as they are automatically filled out by the calculations.