--- title: "Formula URL parameters" slug: "efp-formula-url-parameters" description: "Learn how to configure Exact Forms Plus buttons using formula fields, URL parameters, and temp tokens for efficient document creation and management." tags: ["Quickbase Extension", "Document Generation", "Exact Forms Plus"] updated: 2026-10-09T16:06:19Z published: 2026-10-09T16:06:19Z canonical: "help.quickbase.com/efp-formula-url-parameters" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.quickbase.com/llms.txt > Use this file to discover all available pages before exploring further. # Formula URL parameters The buttons that run Exact Forms Plus are formula fields. The formula builds a URL, and the parameters in that URL tell Exact Forms Plus which template to use, which records to read, what to create, and where to save it. This page lists every parameter. The setup wizard writes this formula for you. Open the button field's properties to see it, and edit it there to change how the button works. ## How the formula is built Buttons created by the setup wizard put all parameters inside `Base64Encode()`, passed as a single `request` parameter. For example, the **Generate EFP Document** button looks like this: ```plaintext var Text url = "https:///doc_merge_ua.aspx?" & "request=" & Base64Encode("clientid=Q1234" & "&appid=" & AppID() &"&tpdbid=" & [_DBID_DOCUMENT_TEMPLATES] &"&tpid=1" & "&msid=" & [Record ID#] &"&msdb=" & Dbid() &"&faid=51" & "&efpdte=52" & "&docfmt=pdf" & "&fn=EFP Document" & "&stream=y" ); "Generate EFP Document" ``` - Keep the start of the URL from the button the wizard created. It points to the Exact Forms Plus server for your account. - Use `doc_merge_ua.aspx` to open the document in the browser. Use `doc_merge.aspx` for the progress bar. See [How users create documents](https://help.quickbase.com/quickbase-extensions/docs/en/efp-features-and-functionality#user-experience). - The `POSTTempToken` class and `data-tempTokenDBID` send a Quickbase temporary token with the request. Keep them. If your account requires temp tokens, Exact Forms Plus checks that the token is valid for the record it's processing. Parameter names aren't case-sensitive. Field parameters take a field ID (a number), except where the table says otherwise. ## Required parameters | Parameter | What it does | Example | | --- | --- | --- | | `clientid` | Your Quickbase Extensions client ID. It starts with Q. The wizard fills it in. | `"clientid=Q1234"` | | `appid` | The app the button runs in. Exact Forms Plus checks that this app is authorized for your account. | `"&appid=" & AppID()` | | `tpdbid` | The Document Templates table. Use the table alias instead of the table ID. | `"&tpdbid=" & [_DBID_DOCUMENT_TEMPLATES]` | | `tpid` | Record ID# of the template record to use. Must be a number. | `"&tpid=1"` | | `msdb` | The table that holds the records to process (the master table). `Dbid()` is the table the button is on. | `"&msdb=" & Dbid()` | | `msid` | Record ID# of the record to process. To process many records, use `msqry` or `msqid` instead (see [Many records](/quickbase-extensions/docs/efp-formula-url-parameters#multiple-records)). The record must be saved first, so don't show the button while adding a record. | `"&msid=" & [Record ID#]` | ## Output file | Parameter | What it does | Example | | --- | --- | --- | | `docfmt` | `pdf` creates a PDF. Any other value creates a Word document, and if you leave it out, Exact Forms Plus creates a Word document. The Word format matches the template: a .docx template creates a .docx file, a .doc template creates a .doc file. | `"&docfmt=pdf"` | | `fn` | File name, without the extension. Exact Forms Plus removes characters that aren't allowed in file names and adds `_` and the record's Record ID# at the end, for example `PurchaseOrder_3.pdf`. If you leave it out, the name is `NA`. To build the name from fields on each record, put field IDs between two tildes, separated by periods. After a colon, add the separator to put between the values (default `_`). After a `\|`, add fixed text to put at the end. For example, `fn=~7.11:-~\|FEB2026` with field 7 = `Acme` and field 11 = `1007` on record 9 creates `Acme-1007FEB2026_9.pdf`. The fields must be in the template's clist. Use exactly two tildes. Text before the first tilde isn't supported. | `"&fn=PurchaseOrder"` `"&fn=~7.11:-~\|FEB2026"` | | `fnrid` | `n` leaves the Record ID# off the file name. If you also create a merged document, make sure the file name is different for each record, for example with a field in `fn` (see `fn` above). | `"&fnrid=n"` | | `stream` | What happens after the document is created, with `doc_merge_ua.aspx`: - `y`: open the document in the browser. - `d`: download it instead of opening it. - `n` or left out: don't open or download it. The document opens only when one document is created, or when a merged document is created. `doc_merge.aspx` (progress bar) doesn't open the document. | `"&stream=y"` | | `clist` | Field IDs to read from the master table, separated by periods. Every field the template uses must be listed. Leave it out to use the clist on the template record, which is recommended. | `"&clist=3.6.10.11"` | | `clist2` | Extra master table field IDs whose values you want to use inside an embedded report, for example `~25~` in a description field of a table that isn't related to the master table. | `"&clist2=25.26"` | ## Update the record These parameters save the document to the record and change other fields after the document is created. The user token saved for your account must be allowed to edit the fields. When you save to a repository table (`repository=y`), the master record isn't updated, so these parameters are ignored. | Parameter | What it does | Example | | --- | --- | --- | | `faid` | File attachment field to save the document in. The wizard creates **EFP Document** for this. Leave it blank to not save the document to the record. | `"&faid=51"` | | `efpdte` | Date/time field to set to the time the document was created. The wizard creates **EFP Date** for this. | `"&efpdte=52"` | | `docsize` | Numeric field to set to the document's file size, in bytes. | `"&docsize=53"` | | `upmap` | Copy values between fields on the record: `target:source`, with `\|` between pairs. `60:59\|61:33` sets field 60 to field 59's value and field 61 to field 33's value. Exact Forms Plus reads the source fields itself, so they don't have to be in the clist. | `"&upmap=60:59\|61:33"` | | `uid` | Set a user, email, or text field to the person who selected the button: `field ID:email address`. Use this instead of `upmap`, because Exact Forms Plus runs as the user token saved for your account, not as the person who selected the button. | `"&uid=99:" & UserToEmail(User())` | | `clear` | Fields to clear after the document is created, separated by periods. | `"&clear=10.20"` | | `preqbaction` | A Quickbase API_EditRecord call, Base64 encoded, that runs **before** the document is created, for example to stamp a field the template prints. It runs only when the button sends a temp token, and uses that token, so you don't need an app token in the call. | See the example after this table. | To use `preqbaction`, add it inside the button formula's `Base64Encode()`, with the API call wrapped in its own `Base64Encode()`. This **Generate EFP Document** button sets field 121 to the current time and field 122 to the user's name before the document is created: ```plaintext var Text url = "https:///doc_merge_ua.aspx?" & "request=" & Base64Encode("clientid=Q1234" & "&appid=" & AppID() &"&tpdbid=" & [_DBID_DOCUMENT_TEMPLATES] &"&tpid=1" & "&msid=" & [Record ID#] &"&msdb=" & Dbid() &"&faid=51" & "&efpdte=52" & "&docfmt=pdf" & "&fn=EFP Document" & "&stream=y" & "&preqbaction=" & Base64Encode(  URLRoot() &"db/" & Dbid() & "?act=API_EditRecord"  & "&rid=" & URLEncode([Record ID#])  &"&_fid_121=" & ToText(Now())  &"&_fid_122=Updated by: " & UserToName(User())  ) ); "Generate EFP Document" ``` - Keep the `POSTTempToken` class and `data-tempTokenDBID`. Without the temp token, the call isn't run. - Build the call with `URLRoot()` so it points to your own Quickbase realm. A call to any other address is rejected. - If the call fails, no document is created, and the error page shows the Quickbase error message. ## Protection, watermark, and PDF options | Parameter | What it does | Example | | --- | --- | --- | | `docpw` | Password. For a PDF, it's needed to open the file. For a Word document, it's needed to edit it. The document opens read-only without it. | `"&docpw=" & [Document Password]` | | `docpwo` | PDF owner password. Blocks printing, editing, and copying. It doesn't require a password to open the file. Use `docpw` as well for that. | `"&docpwo=" & [Owner Password]` | | `wm` | Watermark on Word and PDF documents: `text\|color\|size`. The color is a name such as `Red`, or a hex value such as `#FF0000`. In a formula that doesn't use `Base64Encode()`, write the `#` as `%23`. | `"&wm=DRAFT\|Red\|65"` | | `fillout` | `y` keeps the template's form fields fillable in the PDF. Only legacy Word form fields are supported. | `"&fillout=y"` | | `accessible` | `y` keeps the document's structure tags in the PDF, and the title and description of images and other objects, for screen readers (Section 508). | `"&accessible=y"` | | `embedfonts` | `y` embeds TrueType fonts in the PDF. Off by default to keep the file small. | `"&embedfonts=y"` | | `prefiles` | PDFs to put **before** the generated PDF. PDF output only. Separate files with periods. Each file can be: - a file attachment field on the record: `109`; - a file attachment field on a record in another table: `table ID:Record ID#:field ID`, for example `bxxxxxxxx:1:7`, or `bxxxxxxxx:RID:7` for the record's own Record ID#; - a field whose value is one or more of those: `FID123`; - a PDF in Amazon S3: `S3\|key`, for example `S3\|terms/standard-terms`. The files are added in the order you list them. For a file in Amazon S3: - Exact Forms Plus reads it from the S3 bucket saved for your account, or from `s3bkt` if the formula sets it. If the bucket setting includes a folder, the key is read from that folder. - Use the file's key exactly as it's stored. Nothing is added to it. Because files are separated by periods, the key can't contain a period, so store the PDF with a key such as `terms/standard-terms`, not `standard-terms.pdf`. - The S3 file needs the metadata `filename` (`x-amz-meta-filename`) set to a name that ends in `.pdf`. - To use a different file for each record, put `RID` in the key. `S3\|covers/cover_RID` reads `covers/cover_3` for record 3. Don't use a capital `RID` anywhere else in the value, because every `RID` is replaced. - If the file isn't found or isn't a PDF, it's left out, and the document is created without it and without an error message. Your account sets the maximum number of files. See [Add and merge PDF files](https://help.quickbase.com/quickbase-extensions/docs/en/efp-add-and-merge-pdf-files). | `"&prefiles=109.108"` `"&prefiles=S3\|terms/standard-terms"` `"&prefiles=S3\|covers/cover_RID.109"` | | `addfiles` | Same as `prefiles`, but the files go **after** the generated PDF. | `"&addfiles=109.bxxxxxxxx:1:7"` | ## Many records Use `msqry` or `msqid` instead of `msid` to create one document for each record the query returns. Each document is saved to its own record. The default limit is 50 documents per run. If the query returns more, only documents up to the limit are created, and only the **Generate EFP Document (PB)** (progress bar) button says the limit was reached. For larger runs, use the [Exact Forms Plus Batch Processor](https://help.quickbase.com/quickbase-extensions/docs/en/efp-batch-processor-overview). | Parameter | What it does | Example | | --- | --- | --- | | `msqry` | A Quickbase query on the master table, in the same format as the `query` parameter of [API_DoQuery](https://help.quickbase.com/docs/api-doquery). When your account requires temp tokens, the query must read records from the table in `msdb`. | `"&msqry={'10'.EX.'Active'}"` | | `msqid` | The ID of a saved report on the master table. Exact Forms Plus processes the report's records. Don't use it for a single record. Use `msid` instead. | `"&msqid=12"` | | `slist` | Sort by these field IDs, separated by periods. | `"&slist=3.10"` | | `opts` | Query options, separated by periods: `num-n` (at most n records), `skp-n` (skip the first n), `sortorder-A` / `sortorder-D`. Give one sort letter for each field in `slist`, for example `slist=7.8.9` with `opts=sortorder-DDD`. | `"&opts=sortorder-AD"` | ### Merged document To combine the documents from a run into one file, pass `mrgdbid` and `mrgrid`. The merged file is a PDF when `docfmt=pdf`, and a Word document otherwise. | Parameter | What it does | Example | | --- | --- | --- | | `mrgdbid` | Table of the record that gets the merged file. | `"&mrgdbid=" & Dbid()` | | `mrgrid` | Record ID# of that record. | `"&mrgrid=" & [Record ID#]` | | `mrgfa` | File attachment field on that record for the merged file. | `"&mrgfa=10"` | | `mrgfn` | Merged file name. Exact Forms Plus adds `_` and `mrgrid`. If you leave it out, the name is `Merged_` plus `mrgrid`. | `"&mrgfn=AllInvoices"` | | `mrgdte` | Date/time field on that record to set when the merged file is created. | `"&mrgdte=11"` | | `mrgdocsize` | Numeric field on that record for the merged file's size, in bytes. | `"&mrgdocsize=12"` | | `mrgfiles` | More PDFs to add to the end of a merged PDF. PDF only. Plain field IDs refer to the record that gets the merged file. `table ID:Record ID#:field ID` and `S3\|key` entries work as in `addfiles`; `RID` and `FID` don't. See [Add and merge PDF files](https://help.quickbase.com/quickbase-extensions/docs/en/efp-add-and-merge-pdf-files#merged-document). | `"&mrgfiles=109.108"` | | `mrgkeyfid` | Field on that record for the merged file's Amazon S3 key, when the merged file is saved to S3. | `"&mrgkeyfid=13"` | | `mrgs3keyval` | S3 key for the merged file, without the extension. Default: `mrgfn_mrgdbid_mrgrid`. | `"&mrgs3keyval=invoices/2026-10"` | ## Repository table Save the document on a record in another table, usually a documents table related to the master table, instead of on the master record. | Parameter | What it does | Example | | --- | --- | --- | | `repository` | `y` saves to the repository table. `rpdbid` is then required. | `"&repository=y"` | | `rpdbid` | The repository table. Use the table alias. | `"&rpdbid=" & [_DBID_DOCUMENTS]` | | `rpfid` | The repository table's reference field to the master table, for example **Related Purchase Order**. | `"&rpfid=9"` | | `rpfidval` | Value to put in `rpfid`, when the master table's key field isn't Record ID#. | `"&rpfidval=" & [PO Number]` | | `rpfafid` | File attachment field in the repository table for the document. | `"&rpfafid=13"` | | `rpmode` | `a` adds a new record each time. `u` updates the record found with `rpkfid` and `rpkval`. If none is found, a new record is added. If several are found, only the last one is updated. | `"&rpmode=u"` | | `rpkfid` | With `rpmode=u`: field in the repository table to search. | `"&rpkfid=20"` | | `rpkval` | With `rpmode=u`: value to search for. | `"&rpkval=" & [Record ID#]` | | `rpmap` | Copy master record values to the repository record: `repository field:master field`, with `\|` between pairs. Exact Forms Plus reads the master fields itself, so they don't have to be in the clist. Don't map the fields in `rpfid`, `rpfafid`, or `rpkfid`. | `"&rpmap=9:6\|7:218"` | | `rpuid` | Set a user, email, or text field on the repository record to the person who selected the button: `field ID:email address`. | `"&rpuid=99:" & UserToEmail(User())` | To also save to cloud storage, add the parameters below. The key fields (`keyfid`, `dropboxkeyfid`, `egnytekeyfid`) then refer to fields on the repository table. ## Cloud storage Your account must be set up for the service first. The setup wizard adds these parameters and a **View File** link when you choose a cloud storage type. For `amazons3`, `dropbox`, and `egnyte`: `y` saves each document, and the merged file if there is one; `d` saves only the individual documents; `m` saves only the merged file. | Parameter | What it does | Example | | --- | --- | --- | | `amazons3` | Save to Amazon S3: `y`, `d`, or `m`. | `"&amazons3=y"` | | `keyfid` | Field that gets the file's S3 key. The wizard creates **S3 Key** for this. | `"&keyfid=81"` | | `s3keyval` | S3 key for the file, without the extension. You can build it from fields as in `fn`, for example `~3.7:/~`. Default: the file name plus `_` and the table ID, for example `PO_1003_3_bxxxxxxxx.pdf`. | `"&s3keyval=~3.7:/~"` | | `s3bkt` | Use this bucket instead of the one saved for your account. | `"&s3bkt=my-bucket"` | | `encrypt` | `y` stores the file in S3 with server-side encryption (AES-256). | `"&encrypt=y"` | | `dropbox` | Save to Dropbox: `y`, `d`, or `m`. | `"&dropbox=y"` | | `dropboxdir` | Use this Dropbox folder instead of the one saved for your account. | `"&dropboxdir=Invoices"` | | `dropboxkeyfid` | Field that gets the file name in Dropbox. The wizard creates **Dropbox Key** for this. | `"&dropboxkeyfid=82"` | | `egnyte` | Save to Egnyte: `y`, `d`, or `m`. | `"&egnyte=y"` | | `egnytedir` | Use this Egnyte folder instead of the one saved for your account. | `"&egnytedir=/Shared/Invoices"` | | `egnytekeyfid` | Field that gets the Egnyte file ID. The wizard creates **Egnyte File ID** for this. | `"&egnytekeyfid=83"` | ## Other parameters | Parameter | What it does | Example | | --- | --- | --- | | `native`, `stdbid` | `native=y` uses a Quickbase Document Creation template instead of a Word template. `tpid` is then the Quickbase template's ID and `stdbid` is the Document Subtables table. The wizard sets these when you choose a Quickbase native template. See [Use Exact Forms Plus with Quickbase Document Creation templates](https://help.quickbase.com/quickbase-extensions/docs/en/efp-quickbase-document-creation-templates). | `"&native=y"` | | `test` | `y` runs a test to check template changes. It doesn't count toward your transactions, but your account has a monthly limit of test runs. In test mode, Exact Forms Plus: - creates one PDF, whatever `docfmt` says, named `JUICEDExactFormsPlusTEST` plus the Record ID#, with a red watermark; - blocks printing, editing, and copying; - doesn't save anything or update any record (file attachment, cloud storage, repository, merge, and update parameters are ignored). Works only with `doc_merge_ua.aspx`. Remove it, or set it to `n`, when you're done. | `"&test=y"` | | `ver` | `y` shows the Exact Forms Plus version instead of creating a document. It isn't counted as a run. | `"&ver=y"` | | `apptoken` | Not needed. Exact Forms Plus uses the user token saved for your account. The wizard leaves it blank. | `"&apptoken="` | ## Batch Processor parameters The **Batch Processing Arguments** field that the wizard creates uses the same parameters, separated by spaces instead of `&`, plus these. The wizard fills them in. | Parameter | What it does | | --- | --- | | `type`, `configid` | Identify the request and your batch configuration. Exact Forms Plus checks the request against the batch configuration saved for your app, so if you change the arguments, the batch configuration must match. | | `msdbefid` | One-record runs: field on the record that gets the error message if the run fails, and the completion time otherwise. The wizard uses **EFP Batch Trigger - Msg Field**. | | `errdbid`, `errmsgfid`, `errrfid`, `errrfidval`, `errargsfid` | Bulk runs: the Batch Processing Errors table, and its error message, related record, related record value, and arguments fields. | If a value can contain spaces, put it in double quotes, or the batch run fails. For a field value: `& " fn=\"" & [Field Name] & "\""`. For fixed text: `& " fn=\"Purchase Order\""`. For setup, see [Exact Forms Plus Batch Processor overview](https://help.quickbase.com/quickbase-extensions/docs/en/efp-batch-processor-overview). ## Related - [Overview](/about-exact-forms-plus.md)