Using {{{_keys}}} to inspect the current template context
The problem it solves
In Mustache templates a missing key renders exactly the same as an empty one — a blank. That makes it hard to know whether a placeholder you typed is simply empty for this record or does not exist at all. It is also hard to remember which keys are available inside a specific loop (for example, what fields are on a bomComponents entry versus a workOrders entry).
How to use it
-
Open any Custom HTML export template for editing (Work Order, Production Run, Packing Slip, Purchase Order, Invoice, Assembly Order, or any label type).
-
At the top of the template body, or inside the loop you want to inspect, type:
{{{_keys}}}Note the triple braces — the output is an HTML table, so double braces would escape it.
-
Export or preview the document. The placeholder renders as a table with two columns — Key and Type — listing every field available at that point in the template.
-
Inside a loop (e.g.,
{{#bomComponents}}{{{_keys}}}{{/bomComponents}}), the table shows the loop entry's fields, not the document root's. -
Once you have found the keys you need, remove
{{{_keys}}}before saving the published template. It is an authoring aid only.
Type words in the table
| Type shown | What it means |
|---|---|
string | Plain text value |
string (empty) | Exists but is blank for this record |
number | Numeric value; supports .raw, .formatted, etc. sub-keys |
currency | Currency value; same sub-keys as number |
date | Date value; supports .short, .long, .iso, etc. |
datetime | Date + time value; same sub-keys as date |
map of N | Key-value map (e.g., custom fields); use dot notation like orderCustomFields.myField |
list of N | Array / loop section; wrap in {{#name}}…{{/name}} |
object | Nested object; access with dot notation |
boolean | True/false; use as a conditional section {{#flag}}…{{/flag}} |
null | Field is present but has no value for this record |
Works at every context level
- Document root — place
{{{_keys}}}outside any loop to see all top-level fields. - Inside any loop — place it inside
{{#orderLines}},{{#bomComponents}},{{#workOrders}}, etc., to see that loop entry's fields. - Performance — the key inspection is skipped entirely if your template does not contain the text
_keys, so there is no rendering overhead in published templates.
Placeholder browser tip
For Production Run templates, the placeholder browser in the editor now lists work-order custom fields in their own group (labelled "Work Order: Order Custom Fields — nested inside the {{#workOrders}} loop"), separate from the run's own batch-level custom fields. Use the browser to find field names, then use {{{_keys}}} inside the relevant loop to confirm the exact camelCase key and its type before writing your template markup.