Hide on last repeat formatting control
Learn how to prepare and link a template for automation in Smarter Drafter Pro.
When you're working with repeating content, there's often something you want to appear between each item but not after the last one. The classic example is an affidavit cover sheet listing multiple respondents, where each name needs "AND" between them — but a trailing "AND" after the final name would produce invalid output.
Hide on last repeat is a Formatting Control that solves this cleanly. Wrap it around any separator content - a word, phrase, or block-level element - and it will automatically be removed on the final iteration of the surrounding repeating content control. No conditional logic, no fragile workarounds.
It works inside both Linked Records repeating content controls and Conditional Rules repeating content controls, including nested scenarios.
How to add Hide on last repeat
Wrap your repeating content control around the content
In your Word template, wrap a repeating content control (either Linked Records or Conditional Rules) around the content that should repeat. In the affidavit example, this is the borrower block — the name plus the "AND" that follows it.
Merge your fields as normal
Merge the relevant field into the placeholder (for example, [Borrower Name] becomes the merged Borrower Name field). All your usual merge and formatting behaviour continues to work inside the repeating control.
Wrap "Hide on last repeat" around the separator
Place your cursor around just the separator content (in this case, the word "AND"), then in the Smarter Drafter Word add-in:
- Open Formatting Controls
- Click ADD next to Hide on last repeat
The control wraps around your selection. On the final iteration of the repeating content control, that content will be removed from the generated document.
Test your output
Run a test submission with multiple records to confirm the separator appears between every iteration except the last.
How it behaves
-
Spacing is handled automatically. If the wrapped content sits inline with surrounding text, Smarter Drafter checks for a space before and after, then removes the appropriate space when hiding — so you won't get double spaces or awkward gaps.
-
Empty paragraphs are removed. If the wrapped content is the only thing on a line, the entire paragraph is removed on the last iteration rather than leaving a blank line behind.
-
Multiple controls per repeater are supported. You can use Hide on last repeat more than once inside the same repeating content control — for example, one in the body and one in a footer line. Each evaluates independently against the same iteration index.
-
Nested repeaters are supported (Linked Records). When you have nested Linked Records repeating content controls, "last repeat" always refers to the immediate surrounding repeater — not any outer repeater. This means each level behaves predictably on its own.
-
Deletion works like other controls. To remove a Hide on last repeat control, use the standard delete action in the add-in. You'll be given the option to keep or remove the inner content.
-
Hide on last repeat cannot be nested inside another Hide on last repeat — there's no meaningful behaviour for this combination.
- There are no settings on this control. Its behaviour is fixed: hide on the final iteration.
Common Issues & Solutions
- Issue: I can’t see content controls or formatting marks.
- Solution: Make sure Design Mode and paragraph marks are both turned on under the Developer Tab and Home tab, respectively.
- Issue: My form isn’t showing in the dropdown.
- Solution: Confirm the form has been created in Smarter Drafter and you have the right access.