Conditional Page Inclusion
This tutorial configures two conditional pages in an output template:
- A "Variations" page that only renders when the Variations register has rows.
- 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
- Open the blueprint → Output Designer → select the output template.
- 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.
- Click + Add page → name:
Step 2 — Add the visibility rule
- Right-click the Variations page tab at the top of the canvas.
- Select Set Visibility Rule… from the context menu.
- Enter the expression:
COUNT([sections.VariationRegister.rows]) > 0
- 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
- Add a heading component:
Variation Register. - Add a Table component → bind to the
VariationRegistersection. - Columns: Variation No., Description, Value ($), Status, RAG.
- Sort by: Variation No. ascending.
- Add a Table footer row with a Sum of the Value column:
Total Variation Value: {{SUM([sections.VariationRegister.rows.Value])}}. - 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:
- On the Project Status page (not the Variations page), add a text component.
- Set text:
No variations have been registered for this reporting period. - Set component visibility rule:
COUNT([sections.VariationRegister.rows]) = 0
- 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
- Click + Add page → name:
Critical Risks. - Position it after the standard Risk Register page.
Step 6 — Add the visibility rule
- Right-click the Critical Risks page tab → Set Visibility Rule….
- 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
- Add a heading:
Critical Risks Requiring Immediate Attention. - 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. - Add a Table component → bind to
RiskRegister. - Add a filter: Severity = "High" AND RAGStatus = "Red".
- Columns: Risk ID, Description, RAG Status, Mitigation Owner, Mitigation Actions, Due Date.
- Sort by: Due Date ascending (most urgent first).
- 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:
- Add a KPI Row with 3 cards.
- 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")
- KPI cards:
- "Red Risks":
{{var.RedRisks}}— red background if > 0 - "Amber Risks":
{{var.AmberRisks}}— amber background if > 0 - "Green Risks":
{{var.GreenRisks}}— green background
- "Red Risks":
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
- Create a test edition.
- Leave the Variation Register section empty (no rows added).
- Click Preview output.
- Verify: Variations page is absent from the output.
- Verify: The "No variations" text component appears on the Project Status page (if configured in Step 4).
Step 10 — Test Variations page: with rows
- In the same test edition, add 2 rows to the Variation Register.
- Click Preview output again.
- Verify: Variations page appears with the 2 rows and the total footer.
Step 11 — Test Critical Risks page: no qualifying risks
- Add 3 rows to the Risk Register with:
- RAG: Red, Severity: Medium (not high)
- RAG: Amber, Severity: High (not red)
- RAG: Green, Severity: Low
- Click Preview output.
- Verify: Critical Risks page is absent (no row matches High severity AND Red RAG).
Step 12 — Test Critical Risks page: qualifying risk exists
- Add one more row: RAG: Red, Severity: High.
- Click Preview output.
- Verify: Critical Risks page appears with just the Red + High row.
Summary of what you've built
| Page | Visibility trigger | Appears when |
|---|---|---|
| Variations | Row count > 0 | Any variation row exists |
| Critical Risks | Red + High count > 0 | At 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.
Related
- Conditional Visibility Patterns — full pattern library for conditional pages and components
- Multi-Output Blueprint tutorial — building multiple output formats from one blueprint
- Report Variables — defining reusable variables for visibility expressions
- Output Designer Overview — navigating the Output Designer