Advanced options
These are the deepest, most technical settings in an export template's Template configuration. Almost no template needs them — the page exists so that when you do meet one, you know what it means. If you're unsure about any of these, leave it untouched or check with your administrator.
Visibility condition
Controls when the template is offered, based on a value on the record. Use it to hide a template unless the record is in the right state.
- Visibility condition field code — the field on the record to check.
- Visibility condition field value — the value(s) that field must have for the template to appear. (For example, only offer a "Final invoice" template when a status field equals Approved.)
Address mapping
- Address mapping — tells the template which field(s) hold the recipient address(es), so it knows where to send the result. Useful when the address lives on the record rather than being typed each time.
Include file IDs
- Include file ids — attach specific stored files to the output by their ID numbers. This is the by-ID counterpart to the simpler Include uploaded files switch on the Template configuration page.
Filtering
Filtering limits which records the template applies to. You can add several filter rules; a record must match for the template to run. Each rule has:
- User input — Yes asks the person for the value when they run the template; No uses the fixed Search value below.
- Search field, not object — Yes searches a custom field; No searches the main record.
- Field name — the field the rule looks at.
- Search column — the specific column to match on (when applicable).
- Search operator — how to compare (for example equals, not equals, contains, greater than).
- Search value — the value to compare against (used when User input is No).
Use the + / − buttons to add or remove rules.
Optional distribution configuration
The same kind of rules as Filtering, but applied to delivery rather than to which records qualify — use it to vary or restrict how the result is sent. Each entry offers Field name, Search column, Search field, not object, Search operator, and Search value.
Required data
Required data pulls in extra related data that the template body needs but that isn't part of the main record — for example details from a linked ship or company. You can add one or more data sets, each with:
- Mapping key — the key that identifies the related data to fetch.
- Multiple — Yes if more than one related record may come back.
- Output — the name the fetched data is given so you can use it in the body.
- Field — the field used to match the related data to the record.
- Requested fields — the specific fields to bring back (for example
$nautical_ship_imo,$nautical_ship_general_port).
Each data set can also have:
- Children — nested related data (data hanging off the data you just pulled in), each with its own Child mapping key, Child multiple, Child output, and Child field.
- Filtering — the same filter rules as above, to narrow which related records are fetched.
Required data, filtering, and distribution rules change what data the template sees and which records it runs on. Getting them wrong can make a template produce nothing or the wrong output, so test carefully in the Playground after any change.