With conditional logic, you determine whether a specific block in a document is visible or not, based on predefined conditions. This means that the content of the document automatically adjusts to the data that has been entered.
For example: If you have a template for an employment contract, you can set it up so that all terms regarding the use of a company car are only shown if the employee’s “Department” is set to “Sales.” If a user enters a different department, the company car terms are automatically hidden. This allows you to make your template dynamic and flexible, without needing to create multiple versions of the same document.
In this manual
What can you use conditional logic for?
How does conditional logic work?
How do you set up conditional logic?
Available operators per field type
How can you recognize a block with logic?
What if a rule no longer works?
What can you use conditional logic for?
You can use conditional logic on:
- Smartfields (global)
- Metafields
- Automatic Smartfields
How does conditional logic work?
In each template, you can specify per block when it should be displayed.
Parts of a condition
- Field – for example, a Smartfield such as Location
- Operator – for example, is, contains, or greater than
- Value – for example, "Amsterdam"
Combining multiple conditions:
- AND – all conditions must be true
- OR – at least one of the conditions must be true
Example
Show this block if:
Location is "Amsterdam" and (Position is "Manager" or Employment type is "Freelancer")
How do you set up conditional logic?
- Go to the block in the template where you want to set the logic.
- Click the three dots (⋯) in the top right corner.
- Select ‘Show if’.
- Add one or more conditions.
- Save your rules.
Example:
You want a block to be visible only if the employment contract is Fulltime.
- User selects ‘Fulltime’ in the smartfield → block is shown
- For other choices (such as ‘Parttime’) → block remains hidden
Available operators per field type
The available comparison options (operators) differ per field type:
Field type | Available operators |
---|---|
Text / Email | is, is not, contains, does not contain |
Option list | is one of, is not one of |
Number | is, is not, less than, greater than, between, not between |
To remove the logic from a block:
- Open the template containing the block.
- Click the logic icon in the top right of the block.
- Click the trash can icon to delete the logic.
- Then click Save to save your changes.
The logic is now removed. The block will always be shown from now on.
How can you recognize a block with logic?
A block with conditional logic can be recognized by the logic icon in the top right corner of the block.
Additional information
Hover your mouse over the icon to view the set conditions.
For complex logic, the message appears: “Complex rule, click to view.”
Functionality in a document
A block with logic only appears if the set conditions are met. In the video, you see an example with the smartfield Employment type. As soon as the user selects the option Fulltime or Parttime, the corresponding block automatically appears in the document.
What if a rule no longer works?
Was dit artikel nuttig?
Dat is fantastisch!
Hartelijk dank voor uw beoordeling
Sorry dat we u niet konden helpen
Hartelijk dank voor uw beoordeling
Feedback verzonden
We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren