Conditional section

This widget is only available for document templates.

Conditional sections in Notepad templates allow you to selectively include content in a generated document based on the value of a string template input.

Example of a conditional section in a Notepad template.

Add a conditional section

You can add a conditional section to a Notepad template by clicking + Add Widget or typing / in a paragraph field to open the widget insertion menu, then choosing the Conditional Section option under Generator.

First, select a string template input. You will be able to configure a rule based on the value of this template input.

"Widget properties" panel for conditional section with no template input selected under "Configure template"

After selecting a string template input, you can configure a rule. The "If" section lets you set the condition of the rule, and the "then" section lets you set the consequence.

Widget properties panel where "Configure template input" has doesPlaneNeedMaintenance with value YES, and "Configure rule" has the if/then statement "If doesPlaneNeedMaintenance is equal to YES, then Show"

For example, if the doesPlaneNeedMaintenance template input equals YES, the contents of the conditional section will be displayed.

When a document is generated from a template, the rule configured by the user determines whether the conditional section's contents will be included in the generated document.

You can add a preview value to the selected template input to preview the behavior of the conditional section during template generation. The conditional section will have a green border if the contents will be displayed during template generation, and a red border if the contents will not be displayed.

Template configuration

  • Configure template input: Lets users pick a template input. The contents of the conditional section will be displayed if this template input satisfies the configured rule.

  • Configure rule: Lets users configure the rule that determines whether the contents of the conditional section will be displayed.