Conditional phrases and sentences
A conditional phrase is any inline text — a word, a clause, or a full sentence — that you want to appear only when a certain condition is true. The tags wrap tightly around the text and sit inside the surrounding permanent paragraph.Basic syntax
Syntax by question type
- Yes / No
- Single Select
- Multi-Select
- Blank answer
- CSV data source
Show text when the answer is Yes:Show text when the answer is No (i.e., False):
Multi-condition logic
Combine conditions withand or or to create more precise rules:
Using else and elif
Instead of writing separate if/endif blocks for every alternative, you can chain conditions using else (for one alternative) or elif (for multiple alternatives).
Two options with else:
elif:
Conditional paragraphs
When the content you want to show or hide is an entire stand-alone paragraph — not inline text within a permanent paragraph — you must use the{%p ... %} variant. The p flag tells Gavel to remove the paragraph’s surrounding whitespace as well, so no blank lines are left behind in the final document.
Basic syntax
Conditional numbered paragraphs and table rows
The same{%p %} syntax works for numbered lists and table rows. Place the opening tag on its own line immediately before the item, and the closing tag on its own line immediately after:
Using the Word add-in (no-code)
You do not need to type syntax manually. The Gavel Word add-in lets you insert both phrase-level and paragraph-level conditions through a point-and-click interface.1
Open the Word add-in
Open your document in Microsoft Word and launch the Gavel add-in. Select the workflow you want to use.
2
Highlight the target text
Select the word, sentence, or paragraph you want to make conditional.
3
Choose the condition type
- For inline text within a paragraph, click Show phrase when…
- For a full standalone paragraph, click Show paragraph when…
4
Select the variable and value
Choose the variable name and the answer value that should trigger the content to appear.
5
Add additional conditions (optional)
Click Add Condition and repeat the previous step to build
and/or multi-condition logic.6
Insert
Click Insert. The add-in writes the correct syntax — including
{%p %} for paragraph conditions — directly into your document.The Word add-in is the recommended way to add conditions. It handles spacing, bracket style, and paragraph vs. phrase mode automatically.

