Show a section only when it applies

Last updated 26 October 2026.

For template authors: at the end, part of your template prints only on the records it applies to.

Step 1, in the editor: an Outstanding items section marked Show when · Anything outstanding, and the Show when panel with the rule Order Products has any row where End Date is blank. Step 2, the same template on two orders: SO-0914, with two flanges still to come, shows the section; SO-0921, delivered and signed for, leaves it out.
One delivery note template. The Outstanding items section has a Show when rule, so it prints for an order with something still to come and is left out for one delivered in full.

Before you start

  • You have the Template Author role (Docable Configure and Docable Definition Author), and the template is open in Edit.

Steps

  1. Select what to control: a paragraph, a table, a picture or a whole section.

  2. In the selection bar, choose Show when…. The Show when panel opens on the right.

    A customer letter in Edit view with a Show when section selected: the rule in the right panel, Edit the rule, and Add or remove Otherwise.
    A customer letter in Edit view with a Show when section selected: the rule in the right panel, Edit the rule, and Add or remove Otherwise.
  3. Under rule 1, open Choose what to test… and pick a field, a related list, a calculation or a system value. Then pick the test and a value: for a field, for example is blank or >; for a related list, has any row where… and the rule each row must meet.

    The Show when panel in the editor: rule name Anything outstanding, Show when All rules are met, and rule 1, Order Products has any row where all of End Date is blank, with Add a row rule and Add a rule buttons.
    The Show when panel with the example rule: Order Products has any row where End Date is blank.
  4. To add another test, choose Add a rule. Then set Show when to All rules are met, Any rule is met or Custom logic, such as 1 AND (2 OR 3).

  5. Optional: under Test on records, find a record and choose Test rules. Each record reads shown or hidden.

  6. Choose Apply. A Show when label with the rule’s name now sits above the section.

    The Outstanding items section in the editor with a purple Show when · Anything outstanding label above it, its paragraph and an Expected dispatch calculation chip.
    The section with its Show when · Anything outstanding label.
  7. Optional: to print something else when the rule is not met, select the section and choose Add or remove “Otherwise”.

    The same section with its Otherwise part added: the Otherwise, show when panel and the second salutation under the first.
    The same section with its Otherwise part added: the Otherwise, show when panel and the second salutation under the first.
  8. Optional: under When a value is missing, set If the rule can’t be checked to Hide the content (the default), Show “Otherwise” instead or Stop and say which value is missing.

Example

The Delivery note quick start shows Outstanding items only while a line is still to come. A line counts as delivered when its End Date is filled in.

Setting Value
Selected The Outstanding items heading and the two paragraphs under it
Rule name Anything outstanding
Choose what to test… Order Products, under Related lists
Test has any row where…
Where all of: End Date is blank

Check it worked

In the Show when panel, under Test on records, find two orders and choose Test rules: each reads shown or hidden. Then, in Preview, choose an order with a line still to come: the section prints with its expected dispatch date. Choose an order whose lines all have an End Date: the section is gone.

If it doesn’t work

What you see What to do
Neither the section nor its Otherwise prints. The rule needs a value that is blank on that record. Set If the rule can’t be checked to Show “Otherwise” instead, or to Stop and say which value is missing.
Show when… on a few words in a table cell opens If / otherwise value. A cell’s words cannot be hidden on their own. Fill in that panel: it replaces the selected words.
A rule on Is a sandbox looks the same in every Preview. Preview runs as the org you are in. Test the rule in a sandbox and in production.

Next

Something unclear or wrong? Tell support. Product page: The editor.