Edge Cases & Limits
How ZeroExport behaves at the edges — missing data, malformed rules, limits, and formatting fallbacks — so generated documents stay predictable.
ZeroExport is built to fail safe and stay predictable: missing data renders empty rather than breaking, malformed rules hide content rather than leaking it, and every value has a defined fallback. This page is the reference for that behavior.
Merge field edge cases
| Situation | Behavior |
|---|---|
| Field is empty / blank | Renders as empty text — no {{...}} braces printed |
| Alias or field not in the template's data sources | Rejected on save with an error naming the token and the field to add |
Token names a data source with no field ({{Contacts}}, {{Account}}) | Rejected on save; in an older saved template it prints nothing |
Related record is missing ({{A.B.C}} where B is null) | Renders empty |
Unknown system variable (e.g. {todya}) | Rejected on save, listing the valid names |
Unclosed or unmatched braces ({{Field, Field}}, {toda) | Rejected on save |
| Merge syntax needed as plain text | Escape each brace with a backslash: \{\{Field\}\} prints {{Field}} |
| Field name casing differs | Matched case-insensitively — {{account.name}} = {{Account.Name}} |
Iteration edge cases
| Situation | Behavior |
|---|---|
| Parent has no child records | Repeating rows/items produce no output (no empty row) |
| Table grouped by a list with no rows | Prints its header rows only |
| Need a "no records" message | Add a separate element with a visibility rule for the empty case |
| Builder preview row count | Child collections are capped in preview for speed; full data renders on generation |
| List nesting depth | Nested lists are limited to 3 levels deep |
Conditional visibility edge cases
Visibility is fail-closed — when in doubt, the element is hidden:
| Situation | Result |
|---|---|
| Rule references a missing field | Element hidden |
| Condition has no rows | Element hidden |
| Rule is malformed / errors during evaluation | Element hidden |
| A shared condition references an ID that no longer exists | Element hidden |
Ordering comparison (>, <, >=, <=) on non-numeric values | Condition is false (fail-closed) |
Checkbox field with an operator other than = / != | Condition is false |
Limits
| Limit | Value |
|---|---|
| Conditions per visibility rule | 10 |
| Parenthesis nesting in custom logic | 5 levels |
Exceeding either limit hides the element rather than partially evaluating.
Null and empty handling
Is Nulltreats a truly empty compound field (Address / Geolocation with all sub-fields blank) as empty.- Explicit
=or!=against an empty field still evaluates deterministically (e.g.Field =is true when the field is blank).
Formatting fallbacks
| Case | Behavior |
|---|---|
| Date with no format spec | Rendered in the running user's locale |
| Datetime with no time zone | Converted to the running user's time zone |
| Date-only field with a time zone in the spec | Time zone ignored — the date never shifts across zones |
| Number with no spec | Locale-aware grouping separators |
Percent field (0–100) | % appended without re-scaling |
| Currency in a multi-currency org | Uses the record's own currency symbol, not the user's default |
| Unsupported currency glyph | Substituted with a PDF-safe form (e.g. INR → Rs. , THB → THB ) so it never renders as a blank box |
| Checkbox / Boolean value | Rendered as [X] (true) or [ ] (false) |
| Multi-select picklist | Semicolons become commas: Red;Blue → Red, Blue |
| Compound Address | Rendered multi-line, blank parts omitted |
Large records and debug logs
A record with thousands of child rows is queued instead of generated in the calling transaction when its fetched rows are not expected to fit in the CPU time left (about 3 ms of Apex CPU per row). An active debug log makes Apex take about 2.5 times the CPU, which Apex cannot detect, so test large documents with debug logs off.
PDF rendering constraints
The PDF engine supports a focused subset of CSS. Keep these in mind when styling:
- Not supported: JavaScript, external stylesheets, CSS classes (inline styles only), flexbox/grid, advanced selectors, and pseudo-elements.
- Some currency and script glyphs are missing from default PDF fonts — ZeroExport already substitutes PDF-safe currency symbols for you (see above).
- Preview in HTML first to catch layout issues quickly, then confirm in PDF.
See also
- Conditional Visibility — the rules these limits apply to
- Iterations — repeating content behavior
- Formatting Merge Fields — the full formatting reference