PDF Stamper formula URL parameters

Prev Next

PDF Stamper

Formula URL parameters—what's behind the button?

A formula URL field is used to execute PDF Stamper. The following list shows each URL parameter and a brief description. The formula URL field is typically created in the Quickbase table that stores the master records.

URL Parameter

Description

Sample

Authorization Parameters

clientid

Client identifier assigned to your account during the setup process.

clientid=Q2

appid

Unique identifier for the Quickbase app. This is used to verify that your app is authorized to use PDF Stamper.

appid=bdht2xebx

or

appid=AppID()

apptoken

Application token. If the Quickbase app requires application tokens, pass a token in this parameter.

apptoken=bpsmjrn8nnitjcm5njundgyia6g

request

Encrypted request. Instead of passing clientid and the other parameters as separate URL parameters, you can pass a single request parameter whose value is the Base64-encoded parameter string, with the parameters separated by &. PDF Stamper uses this form only when clientid is not in the URL.

request=<Base64-encoded parameters>

Document Template Parameters

Indicates to PDF Stamper which template to use and what table the template record resides in.

tpdbid

Unique identifier for the Document Template table. This is the table in your app that stores the document templates. You can use the table alias name instead of hard coding the actual dbid. For example, you can use [_DBID_DOCUMENT_TEMPLATES] instead of dbht2xeby

tpdbid=[_DBID_DOCUMENT_TEMPLATES]

or

tpdbid=bdht2xeby

tpid

Record ID# of the Template record in the Document Templates table. This indicates to PDF Stamper which record in the Document Templates table to use in the document generation process.

tpid=1

Master(Parent) table Parameters

msdb

Unique identifier for the Master table. This is the table that stores the master record data. You can use the function dbid() instead of the actual table dbid, and Quickbase converts it properly.

msdb=dbid()

msid

Record ID# of the Master record in the Master table to process. This indicates to PDF Stamper the specific record to process based on the [record id#] value. Typically this is the built in key field on the master table. If it has been renamed then use the renamed field label in between the "[]".

msid=[Record ID#]

msfafid

Uses a file from the Master table as the template instead of the file in the Document Templates table.

msfafid=150

Output File Parameters

fn

File Name—this is the value PDF Stamper uses when creating the document file.

Single record processing: PDF Stamper also appends an underscore and the record id# of the record being processed to the file name.

fn=PurchaseOrder

If the document that is generated in the single record transaction is for record id#3 and a doc is requested. Here is what the file name would look like for that record record:

EX: PurchaseOrder_3.pdf

Note: when using the value from a text field as part of the file name, make sure you use the URLEncode function to make sure that special characters are passed into PDF Stamper properly.

Ex: URLEncode([ClientName])

fn=PurchaseOrder

Acceptable File Name Character Information

faid

File Attachment field id. This is the field id of the file attachment field in the master table that is updated with the PDF Stamper generated document.

faid=51

pdfdte

Stamped date field id. This field is updated when document generation is completed.

pdfdte=11

wtrds

Watermark image: This is a rich text field that shows the watermark

wtrds=65

inswtr

Field ID that points to a checkbox field. If this is true, it displays the watermark

inswtr=64

wtrpst

Watermark Position: Choose where on the page to display the watermark.

Options are: Top-Left, Top-Right, Center, Bottom-Left, Bottom-Right

wtrpst=66

pgnm

The page number you want the watermark on.

pgnm=69

rsfid

Related Subtable field id. This should be the field id from the Document Subtables table for the Relationship between the Document Templates and Document Subtables.

Typically the field name for this field is Related Document Template.

rsfid=14

fill

If the PDF template file is a fillable PDF file and you are using ~fid123~ in the fillable fields, you need to indicate that the PDF is fillable by passing this parameter in with a y value. If you are using coordinates to stamp the data, you can pass n.

fill=y

fillfid

This is the field id of the field on the Document Subtables table named Is Fillable.

This is used to indicate whether or not any subtables that are being included in the template are fillable or not.

fillfid=32

fillout

If you want the generated output PDF file to be fillable, set this to y. If you do not want it to be fillable, set this to n.

fillout=n

fnrid

File Name Record ID#. By default, PDF Stamper Batch appends the Record ID# at the end of the generated document file name. If this is not the experience you want, then include fnrid=n in the parameter list.

Ex: For a record with Record ID# = 123

The generated document file name is: Invoice_123.pdf

If fnrid=n is passed as a URL parameter, the file name is Invoice.pdf

fnrid=n

Amazon S3 Parameters

amazons3

Amazon S3 integration. If the generated document is to be stored in Amazon S3, set this parameter to y, d, or m.

y—stores the file, or files in multi-record processing, in Amazon S3

Multi-record processing

  • y—stores both the individual and merged files in S3

  • d—stores only the individual files and not the merged file in S3

  • m—stores only the merged file and not the individual files in S3

amazons3=y

amazons3=d

or
amazons3=m

s3bkt

Amazon S3 bucket name. This overrides the bucket to use when saving files to Amazon S3. A default bucket is set up when your account is created. If this parameter is not passed in, the default bucket is used. This is a way to override the default bucket.

s3bkt=bktname

s3key (alias: s3customkey)

Name of the file in Amazon S3 (the S3 key). This overrides the name PDF Stamper gives the file when it saves it to S3. If this parameter is not passed in, PDF Stamper builds the name from the fn value, the master table dbid, and the Record ID# of the record being processed (see keyfid for the format). This is not a credential—your Amazon S3 access keys are never passed in the URL.

s3key=PurchaseOrder_3

s3fnfid

When generating multiple files, if you want each file name to be unique in S3, pass in the field id of a field in the individual records that stores the name you want to use.

s3fnfid=33

keyfid (alias: s3keyfid)

Amazon S3 key field ID—holds the value of the key that links the document to the record in Quickbase.

Note: when using the save-to-repository-table option and S3 together, this value should be the S3 Key field in the repository table.

The value saved to this field is created by PDF Stamper in the following format:

fnValue_Record ID#Value_msdbValue.file extension

Example:

given the following values passed into PDF Stamper:

fn=PO

Record ID#=3

msdb=bbbbbb

This is the key field value: PO_3_bbbbbb.pdf

keyfid=81

Multi-Record Transaction Parameters—only available in the PDF Stamper Batch Processor

mrgdbid

Merged table id—when creating a merged PDF, you can specify the table that the merged PDF should be stored in.

mrgdbid=bdht34b26

mrgrid

Record ID# of the record that the merged PDF is stored in.

mrgrid=3

mrgfa

File attachment field id to store the merged PDF file in.

mrgfa=10

mrgfn

Name to use for the merged PDF file.

mrgfn=allpdfs

fnfid

Specify the field id from the msdb table that stores the name to be used for the individual files.

fnfid=123

pdfadbid

The dbid of the table that that stores the logs of the merger.

pdfadbid=bjixjh9ut

pdfbdbid

The dbid of the table that is running the batch processor.

pdfbdbid=bjixi5b73

pdfbrid

The record id# of the record that ran the batch processor.

pdfbrid=1

pdftfid

The field id of the field that stores the value PROCESS COMPLETED when the batch has finished.

pdftfid=8

mrgkeyfid

Merged Key Field ID. This is used to identify the field id of the field that stores the S3 key value for the merged file, if the merged file is being saved to Amazon S3.

This is not needed if storing the merged file in a file attachment field.

mrgkeyfid=10

mrgs3key

The name of the merged file when stored in Amazon S3.

mrgs3key=s3filename

msqry

Master table query. This is used to process multiple records in a single transaction. It is used to filter the records from the master table to identify only the records that you want to include in the process. The example in the Sample column generates a document for each record from the master table that has the value Active in the field with field ID 10. You can use the Quickbase API documentation to help you set up the query string filter properly.

Learn about the components of a Quickbase API query.

msqry={'10'.EX.'Active'}

msqid

Master table query id—use the report query id value in this parameter. For example, the List All report is typically 1. You should create a new table report, filter the records to display only the records you want to have documents generated for, and save the report. After saving the report, Quickbase assigns an ID to the new report. Use that value here.

msqid=1

messageid

Message identifier. The Batch Processor adds this value to the name of its log file for the run, so you can match a log file to the request that created it.

messageid=1234

localcopy

Set to y to keep the generated output file on the processing server. By default the Batch Processor deletes the output files after it has saved the documents.

localcopy=y

configid

The Config Key of the batch configuration for PDF Stamper. Before each batch run, the Batch Processor finds the configuration with this key and checks the run's parameters against it. If configid is missing, or no configuration has that key, or a parameter doesn't match the allowed values, the run stops and no status is written to your app. The installation wizard adds configid to the batch arguments for you; if you change a value in the arguments, update the configuration's allowed values first. See Use a configuration in batch runs.

configid=<your Config Key>

Repository Table Parameters

When storing the generated document in a table other than the one the PDF Stamper button is being executed from, these parameters indicate to PDF Stamper which table to store the generated document in and whether a new record should be created in that table or an existing record should be updated.

repository

Use a repository table. Save the generated documents in a table other than the Master table

repository=y

rpdbid

Repository table id

rpdbid=bdht2xebz

rpfid

Repository table field id—key fid for how the table is related to the Master table.

For example, if the Repository table is related to the PO table, the field id of the [Related PO] field would be used here.

rpfid=9

rpfafid

Repository table file attachment field id. Indicates which file attachment field in the Repository table to store the generated file in.

rpfafid=13

rpfidval

Repository Field Value—used when the master table key is set to a field other than the [Record Id#] field.

rpfidval=[keyfieldname]

rpmode

When using repository, specify the mode to use: add or update. Using add always inserts a new record into the repository table. Using update updates a record in the repository table, using the next two parameters to identify which record to update.

When using rpmode=u, if a record is not found, it is inserted

If more than one record is found, only the last record found is modified

rpmode=a

or

rpmode=u

rpkfid

Used with rpmode=u. Field id to search to identify the record to update.

rpkfid=20

rpkval

Used with rpmode=u. Value to search for in the rpkfid field to identify the record to update.

rpkval=[some field]

rpmap

Used to map additional fields in the repository table to fields from the master table.

Field mappings must be field pairings. No variable data is accepted—you must use fields in the table.

Format is fid of repository table : fid from master table | more pairings

One field being mapped: rpmap=9:6

Multiple fields being mapped: rpmap=9:6|6:220|7:218

rpmap=9:6|6:220|7:218

Miscellaneous Parameters

preqbaction

Pre Quickbase Action—allows for the ability to edit the record that the button is selected on, prior to the document being generated. In the past, to perform this type of functionality, you had to perform the API edit record call and then redirect to our extension to generate the document. Using this parameter eliminates the need to redirect since you are passing the API edit record command into the extension itself.

Base64Encode the API edit record command as well. See the sample in the Sample column.

In this example, when the button is selected, the record is edited before the document is created:

  • Field 121 is updated with the current date and time.

  • Field 122 is updated with the text Update by: <Logged in user name>.

  • The document is then created.

Result

On the record, the QB Actions - Replace Redirect section shows two fields that were updated before the document was generated: Pre QB Action Field (fid121) contains the date and time of the click, for example 11-14-2025 08:32 AM, and Pre QB Action Field (fid122) contains Updated by: followed by the name of the user who selected the button.

"&preqbaction=" & Base64Encode(
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord"
& "&rid=" & URLEncode([Record ID#])
& "&_fid_121=" & ToText(Now())
& "&_fid_122=Updated by: " & UserToName(User())
& "&apptoken=bbbbbbbbbbbbbbbbbbbb"
)
)

Here is a sample formula URL field. Replace https://... with your designated PDF Stamper server URL, the one the setup wizard gives you.

Sample URL Code

"https://..."  // your PDF Stamper URL, created by the setup wizard
& "clientid=Q2"
& "&appid=" & AppID()
&"&msdb=" & Dbid()
&"&msid=" & [Record ID#]
&"&tpdbid=" & [_DBID_DOCUMENT_TEMPLATES]
&"&tpid=1"
& "&faid=39"
& "&apptoken=bbbbbbbbbbbbbbbbbbbbbbb"
& "&fn=W-9 Form"
& "&pdfdte=40"
& "&rsfid=14"
& "&fill="

Here is a sample formula text field for the batch processor.

Sample Batch Formula

"clientid=Q2"
& " appid=" & AppID()
&" tpdbid=" & [_DBID_DOCUMENT_TEMPLATES]
&" pdfadbid=" & [_DBID_DOCUMENT_GENERATION_DETAILS] 
&" pdfbdbid=" & [_DBID_DOCUMENT_GENERATION]  
&" msdb=" & [_DBID_CUSTOMERS]
&" apptoken=bbbbbbbbbbbbbbbbbbbbbbb" 
& " tpid=1"
& " pdfbrid="&[Record ID#]
&" faid=39"
& " pdfdte=40"
& " fn=Vacation_Package_Name"
& " pdftfid=8" 
& " rsfid=14"
& " mrgdbid=" & Dbid()
&" mrgrid=" &[Record ID#]
&" mrgfa=24"
& " msqid=6"
& " mrgfn=Merged_Vacation_Packages"
& " type=pdfstamper"