Use Exact Forms Plus with Quickbase Document Creation templates

Prev Next

Quickbase Document Creation lets you build document templates in Quickbase itself, in the table's template editor. Exact Forms Plus can create documents from those templates and then add what it does on top: save the document to a field or cloud storage, record when it was created, insert embedded reports, format values with functions, and add charts.

This page explains how the two kinds of template compare, how to set up a button that uses a Quickbase Document Creation template, and which Exact Forms Plus tokens you can add to it.

Exact Forms Plus templates and Quickbase Document Creation templates

Exact Forms Plus works with either kind of template. The main differences are where the template is built and how fields get into it:

Exact Forms Plus template

Quickbase Document Creation template

Built in

Microsoft Word. The .docx or .doc file is stored in your app's Document Templates table.

The Quickbase template editor for the table (in the table's settings, under document templates).

Template ID in the button (tpid)

The Record ID# of the Document Templates record.

The template's ID in the table's list of document templates.

Field values

Exact Forms Plus tokens such as ~7~. The EFP Configurator fills the template's clist.

Quickbase's own field placeholders, filled in by Quickbase. Exact Forms Plus tokens work too, for fields listed in the button's clist parameter.

Headers and footers

Word headers and footers.

The template editor, or the Exact Forms Plus header and footer tokens (see Headers and footers).

Embedded reports, functions, barcodes, charts

Yes.

Yes, with the parameters and tokens on this page.

Saving, cloud storage, merged documents, protection

Yes, with the formula URL parameters.

Yes, with the same parameters.

Choose an Exact Forms Plus template when you want full control of the layout in Word, or already have the document in Word. Choose a Quickbase Document Creation template when the template is built and maintained in Quickbase, and you want Exact Forms Plus to save it and add features to it.

Which Exact Forms Plus features are available with Quickbase Document Creation templates depends on your account. See If a feature isn't available.

How it works

  1. The user selects the button on a record.

  2. Exact Forms Plus asks Quickbase to generate the document from the Quickbase Document Creation template for that record. Quickbase fills in its own field placeholders.

  3. Exact Forms Plus then processes the result like a Word template: it replaces its own tokens, runs functions, and inserts embedded reports and charts.

  4. It saves the result as a PDF or Word document (docfmt), to the file attachment field, cloud storage, or repository table you chose, and opens it if the button streams the document.

For a run over many records (msqry or msqid), the template is generated once for each record.

Set up a button with the installation wizard

  1. Create the template in Quickbase Document Creation on the table you'll create documents from, and note its template ID.

  2. Run the installation wizard for Exact Forms Plus. On the Setup Type step, choose Quickbase Native Document Template. On the Exact Forms Plus Setup step, enter the template ID in Existing Document Template ID#.

For what the wizard adds to your table, see Exact Forms Plus finish.

Button parameters for Quickbase Document Creation templates

A button that uses a Quickbase Document Creation template has these parameters in addition to the usual ones. The wizard sets them; you can also add them to an existing button.

Parameter

What it does

Example

native

y uses a Quickbase Document Creation template. Required.

"&native=y"

tpid

The Quickbase Document Creation template ID. The template must belong to the table in msdb.

"&tpid=5"

tpdbid

Not used; leave it empty.

"&tpdbid="

clist

Field IDs of the master record that Exact Forms Plus tokens use, separated by periods. There's no template record to supply them, so list every field used by ~fid~ tokens, functions, and fn. If empty, only Record ID# is read.

"&clist=3.209.273.311"

stdbid

The Document Subtables table, needed when the template contains embedded report tokens (~strid=N~). Use the table alias.

"&stdbid=" & [_DBID_DOCUMENT_SUBTABLES]

For example, the parameters of a button that saves a PDF to field 566, stamps the date in field 567, and opens the document:

"clientid=Q1234"
& "&appid=" & AppID()
&"&tpdbid="
&"&tpid=5"                // Quickbase Document Creation template ID
& "&msid=" & [Record ID#]
&"&msdb=" & Dbid()
&"&faid=566"              // file attachment field for the document
& "&efpdte=567"            // date/time field for when it was created
& "&docfmt=pdf"
& "&fn=Quote"
& "&stream=y"
& "&native=y"
& "&clist=3.209.273.311"
& "&stdbid=" & [_DBID_DOCUMENT_SUBTABLES]

Keep the comments out of your formula. All other parameters, such as cloud storage, repository table, merged documents, passwords, and watermarks, work the same way as with Word templates. See Exact Forms Plus formula URL parameters.

Notes:

  • Quickbase generates the template as a Word document. Use docfmt=pdf for a PDF.

  • Don't use a period in fn. The file name is cut at the first period.

  • With stream=y and many records, the document that opens is the last one created.

Add Exact Forms Plus tokens to the template

Type Exact Forms Plus tokens into the Quickbase Document Creation template as plain text, next to Quickbase's own placeholders. Exact Forms Plus processes them after Quickbase has generated the document.

In the template

What it does

See

~209~ or ~Quote Company~

The field's value. The field must be in the button's clist. Field IDs keep working if someone renames the field.

Insert field values

~564~ on a checkbox field

A check box (checked or not) instead of the text Quickbase shows for the field.

How field types appear

~d#f[273]#dddd, MMMM dd, yyyy~

A date in your own format, for example Friday, October 18, 2024.

Dates

~=FormatN(f[311],$)~

A number in words, for example Eight Hundred Thirty Nine Dollars and Forty Cents.

Numbers in words

~=C|€|f[572]~

A currency value with the € symbol.

Currency symbols

~=barcode(f[568],qrcode,50x50)~

A QR code or barcode.

Add barcodes and QR codes

~i:75:200~

An image from a field, at a set size.

Images

~strid=3~

An embedded report. Requires stdbid on the button.

Embedded reports

~=Chart:5:78:300~

A chart from a Quickbase report.

Charts

Embedded reports

Embedded reports give you tables of related records with grouping, subtotals, and full control of columns and formatting. To use them with a Quickbase Document Creation template:

  1. Make sure your app has the Document Subtables table and a Document Templates record to create the reports from. An app set up only for Quickbase Document Creation templates doesn't have them; run the installation wizard once with an Exact Forms Plus template to add them.

  2. Create the embedded report with the subtable configurator and note its Template Reference, for example ~strid=3~. See Insert embedded reports in Exact Forms Plus.

  3. Type the token on its own line in the Quickbase Document Creation template, where the table should appear.

  4. Add stdbid to the button (see Button parameters).

Two tokens, which work only with Quickbase Document Creation templates, add a header or footer to the document:

  • ~h#text#~ puts the text in the header.

  • ~f#text#~ puts the text in the footer, followed by Page and the page number on the right.

The text can include field references such as f[209], but not ~ or #. They apply to the first section of the document.

Charts

The chart function inserts charts from Quickbase chart reports into a document. It works in Exact Forms Plus Word templates and in Quickbase Document Creation templates.

Exact Forms Plus gets the charts from a separate Quickbase Document Creation template that holds only the charts. To set it up:

  1. Create a chart template. On the master table, create a new Quickbase Document Creation template, for example Charts, and note its template ID (for example 5).

  2. Add the charts. In the template editor, add each chart report to the template.

  3. Label each chart. Directly above each chart, add a paragraph that contains only ID: and the report's ID, for example ID: 78. Write ID: in capitals; the space after the colon is optional. Don't format the text or add anything else to that paragraph. To find a report's ID, open the table's settings and go to Reports & charts; the ID is in the Report Id column.

  4. Add the chart function to your document template where the chart should appear:

    ~=Chart:template ID:report ID:size~

    For example, ~=Chart:5:78:300~ inserts the chart labeled ID: 78 from template 5, 300 points wide.

Size

Result

300

300 points wide (72 points = 1 inch), height in proportion.

300X200

300 wide and 200 high. Use a capital X; with a lowercase x, the chart is shown at the default width of 300.

25%

The chart made 25% smaller.

25%F

25% of the chart's original size.

  • Only images in the chart template are used, so keep other images out of it. Each ID: line belongs to the image right below it.

  • The chart template is generated for the record you're creating the document for, but Exact Forms Plus doesn't add a filter. The chart shows the data that the report and the chart template show.

  • The chart function works in the main part of the template, not in embedded reports.

If a feature isn't available

Depending on your account, some Exact Forms Plus features may not be available with Quickbase Document Creation templates:

  • If functions (~=…~), date formats (~d#…~), charts, or embedded reports (~strid=N~) stay in the document as typed, they aren't available for your account with these templates. Field tokens, images, check boxes, and header and footer tokens still work.

  • If a parameter isn't available, no document is created and you see One of the parameters passed into Exact Forms Plus is not allowed when using a Native Document Template, unless you have a full subscription to Exact Forms Plus.

  • If native=y is required for your account and missing, you see Native Quickbase Document Templates must be used since you do not have a full subscription to Exact Forms Plus. Please make sure you have a Quickbase Document template and pass in the native=y parameter and try again.

  • If your account's monthly number of documents from these templates is used up, you see a message that starts Monthly Native Document Template transaction limit exceeded. It shows the limit and the number used so far; the count resets on the 1st of the month.

To find out what your account includes, open a technical support case.

If the document isn't created or looks wrong

What you see

What to do

Error Creating Document using QB Native Doc Gen Document Templates API. followed by a message from Quickbase

Quickbase couldn't generate the template. Check that tpid is the template ID and that the template belongs to the table in msdb.

The template record was not found. or The template table was not found.

native=y is missing, so Exact Forms Plus looked for a Word template. Add native=y to the button.

The document is built from a different, Word template

native=y is missing and a Document Templates record has the same ID as your Quickbase template. Add native=y.

A token such as ~209~ appears as typed

The field isn't in the button's clist. Add its field ID.

Error: The Document Subtable DBID field is blank.

The template has ~strid=N~ tokens, but the button has no stdbid. Add it.

CHART REPORT ERROR: No Chart Found

The chart template has no charts. Check the template ID in the chart function.

CHART REPORT ERROR, or CHART REPORT ERROR: followed by a message

No chart matches the report ID. Check that the ID: line above the chart has exactly that report ID, with nothing else in the paragraph.

If you still need help, open a technical support case.

See also: Exact Forms Plus formula URL parameters, Template fields and functions, Exact Forms Plus document templates.