Skip to main content

Conditional Page Inclusion

This tutorial configures two conditional pages in an output template:

  1. A "Variations" page that only renders when the Variations register has rows.
  2. A "Critical Risks" page that only renders when at least one High-severity Red risk exists.

Assumed blueprint sections:

  • VariationRegister — repeating section with fields: Variation No., Description, Value, Status, RAG.
  • RiskRegister — repeating section with fields: Risk ID, Description, Severity (High/Med/Low), RAG Status, Mitigation.

Concept: data-driven page inclusion

Instead of designing a fixed-page-count report, conditional pages make the output adaptive:

  • Low-risk periods → shorter report, no empty "Critical Risks" page.
  • Periods with variations → Variations page appears automatically.
  • Reviewers never see a blank page that says "No data for this period".

How to set a visibility rule: right-click any page tab in the Output Designer → Set Visibility Rule… → enter an expression. The page is included when the expression is true; excluded when false.

Expression syntax: use [sections.SectionId.rows.FieldKey] to access a column of values, [sections.SectionId.FieldKey] for a single field value, and functions like COUNT, COUNTIF, AND, OR, IF. See the Expression Reference for the full function list.


Part 1 — Variations page (data-driven inclusion)

Step 1 — Open the Output Designer

  1. Open the blueprint → Output Designer → select the output template.
  2. In the page panel, find the Variations page. If it doesn't exist yet, add it:
    • Click + Add page → name: Variations.
    • Position it after the Risk Register page.

Step 2 — Add the visibility rule

  1. Right-click the Variations page tab at the top of the canvas.
  2. Select Set Visibility Rule… from the context menu.
  3. Enter the expression:
COUNT([sections.VariationRegister.rows]) > 0
  1. Click Save.

A teal filter icon appears on the page tab to indicate it has an active visibility rule.

What this does: The Variations page is included in the output only when the VariationRegister section has at least one row. If the register is empty (no variations this period), the page is excluded.

Step 3 — Add the page content

  1. Add a heading component: Variation Register.
  2. Add a Table component → bind to the VariationRegister section.
  3. Columns: Variation No., Description, Value ($), Status, RAG.
  4. Sort by: Variation No. ascending.
  5. Add a Table footer row with a Sum of the Value column: Total Variation Value: {{SUM([sections.VariationRegister.rows.Value])}}.
  6. Apply conditional formatting on the RAG column: RAG chip colours.

Step 4 — Add an empty-state companion component (optional)

For cases where you want to explicitly acknowledge "no variations" without a full page:

  1. On the Project Status page (not the Variations page), add a text component.
  2. Set text: No variations have been registered for this reporting period.
  3. Set component visibility rule:
COUNT([sections.VariationRegister.rows]) = 0
  1. This component appears on the Project Status page only when there are no variations — replacing the absent Variations page with an inline acknowledgment.

Part 2 — Critical Risks page (severity + RAG triggered)

Step 5 — Add the Critical Risks page

  1. Click + Add page → name: Critical Risks.
  2. Position it after the standard Risk Register page.

Step 6 — Add the visibility rule

  1. Right-click the Critical Risks page tab → Set Visibility Rule….
  2. Enter the expression:
AND(
COUNTIF([sections.RiskRegister.rows.Severity], "High") > 0,
COUNTIF([sections.RiskRegister.rows.RAGStatus], "Red") > 0
)

What this does: The Critical Risks page only renders when the risk register contains at least one High-severity AND Red-rated risk. A risk register with only Amber-rated high risks, or with Red-rated medium risks, will not trigger this page.

Variation — trigger on Red alone (any severity):

COUNTIF([sections.RiskRegister.rows.RAGStatus], "Red") > 0

Choose the trigger that matches your organisation's escalation policy.

Step 7 — Add page content

  1. Add a heading: Critical Risks Requiring Immediate Attention.
  2. Add a Callout text component with admonition style (red border): The following risks are rated as High Severity and Red. Immediate mitigation action is required.
  3. Add a Table component → bind to RiskRegister.
  4. Add a filter: Severity = "High" AND RAGStatus = "Red".
  5. Columns: Risk ID, Description, RAG Status, Mitigation Owner, Mitigation Actions, Due Date.
  6. Sort by: Due Date ascending (most urgent first).
  7. Add row-level conditional formatting: Red background for RAG = Red rows.

Step 8 — Add a risk count summary at the top of the standard Risk Register page

On the existing Risk Register page, add a summary KPI row above the table:

  1. Add a KPI Row with 3 cards.
  2. Define variables in the Variables panel:
    • RedRisks = COUNTIF([sections.RiskRegister.rows.RAGStatus], "Red")
    • AmberRisks = COUNTIF([sections.RiskRegister.rows.RAGStatus], "Amber")
    • GreenRisks = COUNTIF([sections.RiskRegister.rows.RAGStatus], "Green")
  3. KPI cards:
    • "Red Risks": {{var.RedRisks}} — red background if > 0
    • "Amber Risks": {{var.AmberRisks}} — amber background if > 0
    • "Green Risks": {{var.GreenRisks}} — green background

This provides context on the main risk page even when the Critical Risks page is not triggered.


Part 3 — Preview and test both conditions

Step 9 — Test Variations page: no rows

  1. Create a test edition.
  2. Leave the Variation Register section empty (no rows added).
  3. Click Preview output.
  4. Verify: Variations page is absent from the output.
  5. Verify: The "No variations" text component appears on the Project Status page (if configured in Step 4).

Step 10 — Test Variations page: with rows

  1. In the same test edition, add 2 rows to the Variation Register.
  2. Click Preview output again.
  3. Verify: Variations page appears with the 2 rows and the total footer.

Step 11 — Test Critical Risks page: no qualifying risks

  1. Add 3 rows to the Risk Register with:
    • RAG: Red, Severity: Medium (not high)
    • RAG: Amber, Severity: High (not red)
    • RAG: Green, Severity: Low
  2. Click Preview output.
  3. Verify: Critical Risks page is absent (no row matches High severity AND Red RAG).

Step 12 — Test Critical Risks page: qualifying risk exists

  1. Add one more row: RAG: Red, Severity: High.
  2. Click Preview output.
  3. Verify: Critical Risks page appears with just the Red + High row.

Summary of what you've built

PageVisibility triggerAppears when
VariationsRow count > 0Any variation row exists
Critical RisksRed + High count > 0At least one High-severity Red risk

The output template now adapts its page count automatically based on edition data — shorter reports in quiet periods, longer reports when issues need attention.