The Document Subtable Excel table is a child of the Document Templates table. Each record is one data table (subtable): a query that pulls a set of records from a Quickbase table and places them in the workbook. A template can have many data tables, on the same sheet or on different sheets. This article describes every field in the table.
For the concepts and worked examples, see Data tables (subtables). For the template table itself, see Document Templates table reference. Several fields hold field IDs and table IDs. To look them up, see Find your Client ID, table IDs, and field IDs.
Note
We recommend the XL Docs Subtable Configurator for creating and editing these records. It builds the query, sort, subtotal, and grouping syntax for you. See Configure a data table. The Configurator label in each row tells you where the field appears in the Configurator.
Note
XL Docs and the Configurator find these fields by their labels, so keep the labels as the installation wizard created them. If a field is missing (for example avlist on an older install), add it with the exact label and the type listed below. See XL Docs Configurator messages and troubleshooting.
Fields
Field | Type | Description | Example |
|---|---|---|---|
Numeric (reference to Document Templates) | The Record ID# of the template this data table belongs to. XL Docs loads every Document Subtable Excel record related to the template being generated. Configurator label: not shown; the Configurator fills it in from the template you opened it from. |
| |
Description | Text | A name for this data table so you can recognize it, for example in the Configurator's Data Tables list. Configurator label: Description (Table/Fields tab, required). Saving without it shows Description is required. |
|
dbid | Text (required) | The table ID (DBID) of the table to query, usually a child table of the master table. It can be a table in another app, as long as that app is authorized for XL Docs with the same user token; see Cross-app subtables. Configurator label: Table (Table/Fields tab, required). Tooltip: Selects the table to grab fields and records from for the data-table. | The DBID from the table's URL. See Find your Client ID, table IDs, and field IDs. |
clist | Text (required) | Where each field of the queried records goes. Same syntax as the template clist: entries separated by periods. In a grid, the row number in each cell is the row where the first record goes; the following records go in the rows below. Suffixes: It must contain at least one entry. An empty clist stops generation with Clist was empty on related subtable #{RecordID} - please enter in at least one field into the clist for this subtable, or unrelate it from the Document Template. Configurator label: the Field Mapping grid (Table/Fields tab, Cell Position and Type columns) and the Images tab. | |
slist | Text | The sort list: the field IDs to sort the records by, separated by periods. The records are sorted by the first field, then by the second, and so on. Ascending is the default; set the direction in slist Options, or add If the data table isn't grouped, the queried table's own default sort is applied after your sort fields. If it's grouped, the grouping field is sorted first. Configurator label: Sort Fields (Query tab, Sort & Record Limits). Pick entries such as Date (Asc) or Date (Desc) from Available Fields. A field can only be used once (You cannot sort by the same field twice.). |
|
slist Options | Text | Options for the sort and for how many records are returned. Separate options with periods. Leave blank for ascending order and all records.
Sometimes called options on older forms. Configurator label: built from the (Asc)/(Desc) choices in Sort Fields, plus Skip Records and Max Records (Query tab). A | With slist |
qry | Text (required) | Which records to include. Three formats are accepted:
To find records related to the master record, compare against a variable from the template clist. With Configurator label: Build a Filter (Query tab). Choosing the value in the field (parent) compares against a master-table field. The Configurator stores it as a column-letter variable such as |
|
stlist | Text | Subtotal row (grids only). Four parts separated by
When the data table is grouped, there's a subtotal row per group plus a grand total row, labeled Grand plus your label and the total count, for example Grand Sub Total (4). Leave unused optional parts blank: The field help reads: FORMAT: Column and text to Display | "." delimited list of columns to total | Color shading for the total row. Configurator label: Subtotals section (Subtotal/Group tab): Row Label, Column for Label, Columns to Total, Row Shading, Suppress Grand Totals. The Configurator saves the shading as a hex color code. |
|
avlist | Text | Average row (grids only). Three parts separated by
When grouped, there's an average row per group and an overall row labeled Total plus your label. Configurator label: Averages section (Subtotal/Group tab): Row Label, Column for Label, Columns to Average, Row Shading. |
|
grouplist | Text | Groups the rows by a field (grids only; one level of grouping).
Combine with stlist to get a subtotal per group. Configurator label: Data Grouping section (Subtotal/Group tab): Grouping Field, Column for Label, Merge Set?, Colorize?. |
|
Is Data Grid? | Checkbox | Checked: every record the query returns is written, one row per record, down the sheet from the clist's row. Grouping, subtotals, averages, Max Line items, Max Lines type, Skip Rows, and Tab sub report order apply only to grids. Unchecked: the values are written to the clist cells once, so only one record's values appear. Use this for a query that returns a single record (for example a header or footer row), or with Each Record as New Tab. Configurator label: Is Data Grid? (Data-Grid Settings tab; checked by default for a new data table; older versions labeled it Is this data-table a grid?). Tooltip: Enables XL Docs to place multiple line-items of data based on the Query. The Subtotal/Group tab appears only while it's checked. | Checked |
Each Record as New Tab | Checkbox | When checked, each record the query returns goes on its own copy of the sheet. Use it only when Is Data Grid? is unchecked. The installation wizard may label this field EachRecordasNewTab; it's the same field. Configurator label: Each Record as New Tab (Data-Grid Settings tab; older versions: Each Record as New Sheet). It's disabled while Is Data Grid? is checked. Tooltip: Every record returned by the query will be put onto its own new sheet. Only usable when 'Is this data-table a grid' is not checked. | Unchecked |
Max Line items | Numeric | How many rows the data table may fill on the sheet, for example when the template has a fixed area of 10 line-item rows. Used with Max Lines type, which says what happens when there are more records. Blank means no limit. Configurator label: Max Line Items (Data-Grid Settings tab). Tooltip: How many line items should be placed onto the sheet? Leave empty for no upper bound. The Configurator requires Max Line Items and Max Lines Type to be set together: Max Line Items and Max Lines Type must both be set, or both be empty. |
|
Max Lines type | Text (multiple choice) | What to do when the records exceed Max Line items:
On older forms this field is labeled If Max Lines > exceeded then do this?. Configurator label: Max Lines Type (Data-Grid Settings tab). Tooltip: What should happen when the sheet reaches the above Max Line Items? |
|
Skip Rows | Numeric | The number of rows to leave after each record in a grid. Default 0 (records on consecutive rows). Use it to leave blank rows between records, or to interleave several data tables: for three queries whose records should alternate row by row, set Skip Rows to 2 on each and start their clists on three consecutive rows (for example rows 12, 13, and 14). Configurator label: Skip Rows (Data-Grid Settings tab). Tooltip: For each line item placed onto the sheet, how many rows should be skipped before we place the next line item? |
|
Sheet | Numeric (required) | The sheet (tab) this data table is written on, counted from the left starting at 1. If the number is higher than the number of sheets in the template, generation stops with Subtable #{RecordID} references Sheet {Sheet}, but the template only has {n} sheet(s) - please fix the Sheet value on this subtable, or add the missing sheet to the template. Data tables are processed in order of Sheet, then Tab sub report order. When the button uses Configurator label: Excel Sheet # (Table/Fields tab, required). Tooltip: Sheet that the data from this data-table will be placed on. |
|
Tab sub report order | Text (multiple choice: blank, 01–05) | Stacks several grid data tables on the same sheet, one below the other, when the earlier ones return a varying number of rows. Think of it like a SQL union running down the sheet, except each data table has its own columns. Give the first data table Configurator label: Tab Sub Report Order (Data-Grid Settings tab). Tooltip: Order position in which this data-table will be loaded onto the sheet with respect to other data-tables on the same sheet. For Example, 01 will load before 02. |
|
Link to table | Formula - URL | Created by the installation wizard: a link that opens the queried table. Not used for generation. | Link to table |
XL Docs Subtable Configurator | Formula - Text with "Allow some HTML tags" (button) | The button that opens this data table in the XL Docs Subtable Configurator. See Configurator overview and installation. | Button labeled XL Docs Subtable Configurator |
Example record
An expense statement template lists a project's expense sheets in rows 12 to 21 of sheet 1. Its Document Subtable Excel record:
Field | Value |
|---|---|
Related Document Template |
|
Description |
|
dbid | The Expense Sheets table's DBID |
clist |
|
slist |
|
qry |
|
Max Line items / Max Lines type |
|
Is Data Grid? | Checked |
Each Record as New Tab | Unchecked |
Sheet |
|
slist Options, stlist, avlist, grouplist, Skip Rows, Tab sub report order | (blank) |