Conditionele logica (ENG)

Gewijzigd op Di, 29 Jul om 4:39 PM

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.


Schermafbeelding



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?

Functionality in a document

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?

  1. Go to the block in the template where you want to set the logic.
  2. Click the three dots (⋯) in the top right corner.
  3. Select ‘Show if’.
  4. Add one or more conditions.
  5. 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 typeAvailable operators
Text / Emailis, is not, contains, does not contain
Option listis one of, is not one of
Numberis, is not, less than, greater than, between, not between


Removing logic from a block

To remove the logic from a block:

  1. Open the template containing the block.
  2. Click the logic icon in the top right of the block.
  3. Click the trash can icon to delete the logic.
  4. 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.



 

Schermafbeelding





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?

Sometimes a logic rule can ‘break.’ This can happen, for example, if:

  • The smartfield has been deleted

  • The selected option in the smartfield no longer exists

You will then see a warning on the block in the template. To fix this, open the logic, check which smartfields or options are missing, adjust the conditions, and save your changes.







Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren