Conditional Sections
Show or hide parts of your document based on field values. Create dynamic templates that adapt to your data.
Overview
Conditional sections let you create one template that works for multiple scenarios:
- Show payment terms only for unpaid invoices
- Display discount info only when a discount exists
- Include specific clauses based on contract type
- Show different content for different customer types
Instead of maintaining multiple templates, you have one smart template that adapts.
Template Setup
Step 1: Identify Conditional Content
Decide which parts of your document should be conditional.
Step 2: Wrap with Section Tags
In your Google Doc, wrap the conditional content with opening and closing tags:
{{section_discount}}
Discount Applied: {{Discount Amount}}
Thank you for being a valued customer!
{{/section_discount}}Syntax
| Tag | Purpose |
|---|---|
{{section_name}} | Start of conditional section |
{{/section_name}} | End of conditional section |
Replace name with a unique identifier (no spaces, use underscores).
Example Template
INVOICE #{{Invoice Number}}
Customer: {{Customer Name}}
Total: {{Total Amount}}
{{section_discount}}
---
DISCOUNT APPLIED
Amount: {{Discount Amount}}
{{/section_discount}}
{{section_notes}}
---
NOTES
{{Notes}}
{{/section_notes}}
Thank you for your business!TypeFlow Configuration
After mapping your fields, TypeFlow will detect your conditional sections.
Step 1: Find Conditional Sections
In TypeFlow, scroll to the Conditional Sections area.
Step 2: Set Conditions
For each section, configure:
| Setting | Description |
|---|---|
| Field | Which Airtable field to check |
| Condition | The comparison (equals, not empty, contains, etc.) |
| Value | The value to compare against (if applicable) |
Common Conditions
| Condition | Shows Section When |
|---|---|
| Is not empty | Field has any value |
| Is empty | Field has no value |
| Equals | Field matches exact value |
| Contains | Field includes the text |
| Greater than | Number is above threshold |
Numeric Conditions
Conditional sections work with numeric fields - currency, percent, number, formula, rollup, count, and autoNumber.
TypeFlow compares the raw value, not the formatted text. So whether your field displays $1,000.50 or 1 000,50 €, the comparison works the same way.
Operators
| Condition | Example | Shows Section When |
|---|---|---|
| Equals | 0 | Amount is exactly 0 |
| Doesn't equal | 0 | Amount is not 0 |
| Greater than | 100 | Amount is above 100 |
| Less than | 50 | Amount is below 50 |
| Greater or equal | 1000 | Amount is 1,000 or more |
| Less or equal | 0 | Amount is 0 or negative |
Percent Fields
Percent fields use the decimal value (Airtable format). For 15%, enter 0.15, not 15.
Combining Conditions
To hide a section when a field is empty OR equals 0, combine two conditions:
- Field is not empty
- Field doesn't equal
0
This is needed because an empty field is not equal to 0, so "doesn't equal 0" alone would still show the section for empty fields.
Use Cases
| Scenario | Condition |
|---|---|
| Show discount section | Discount field is not empty |
| Show overdue notice | Status equals "Overdue" |
| Show premium features | Plan equals "Premium" |
| Show notes | Notes field is not empty |
| Show tax info | Tax Amount greater than 0 |
FAQ
What are conditional sections?
Conditional sections are parts of your document that only appear when specific conditions are met. For example, show a discount section only if a discount was applied.
What conditions can I use?
You can check if a field equals a value, is not empty, contains text, or use numeric comparisons (greater than, less than, greater or equal, less or equal). Numeric conditions work with currency, percent, number, formula, and rollup fields in any locale.
Can I have multiple conditional sections?
Yes. Use unique names for each section like {{section_discount}}, {{section_notes}}, {{section_terms}}.
Can I nest conditional sections?
Currently, conditional sections cannot be nested inside each other. Each section should be independent.
Related Articles
- Line Items - Dynamic tables
- Data Formatting - Format dates, numbers, currencies
Need More Help?
- Email: support@typeflow.us
- Chat: Click the chat icon in the app