Parameters
A formula text field is used to execute PDF Merger. The following page explains most of what is needed for setup. The table below lists parameters used to instruct PDF Merger on what to do and a brief description of how they're used. The parameter field is typically created in the Quickbase table that stores the "Master Records". This process runs in the background and so it is triggered via an email notification. The details of the email notification are within this help site.
Below you can also find 2 modes for how PDF Merger can be set up to run, like Simple Merge and Merge using a Query. Meaning, you can provide a string of values, or create a Quickbase report, or use a Quickbase query instructing PDF Merger on exactly where to go to include files in your PDF.
Notes:
The first section below just describes Authorization parameters (Table A.) which are needed regardless of which mode you set up, like Simple Merge or Merge via Query.
In order to merge files stored in your Dropbox account or store the merged file to your Dropbox account, you need to provide the Dropbox access token and the name of the Dropbox folder for your Dropbox account. Submit a technical support case, and we will provide you with a link to our application that helps you generate a Dropbox access token.
In order to merge files stored in your Amazon S3 account or store the merged file in your S3 account, you need to provide us with the S3 Access Key, S3 Secret Access Key, and the name of your S3 Bucket.
The setup for PDF Merger involves one main "formula text" field which is typically named [PDF Merge parameters]. This field is really all that is required when it comes to setting up PDF Merger in a specific table in your app. (Incidentally, one other thing to do is add an email notification, which is described in PDF Merger Setup.) So, below in this help page are all the details and various ways to configure this field including examples.
Tip
Most of what you see below can be set up using our advanced Setup Wizard available from the Extensions Portal. This is the recommended way to begin this installation.
Simple Merge - uses the "Configuration" parameter
This type of merge uses the "Configuration" parameter as a way to know where the actual files reside and where they ultimately end up. Below is an example of what this formula text field might look like from a code perspective and then an actual example:
"Configuration=bjnjxrzbu:1-7|bjnjxrzbu:4-7|bjnjxrzbu:5-7|bjnjxrzbu:6-7|bjnjxrzbu:7-7|bjnjxrzft:"&[Record ID#]&"-29"
& " clientid=Q487"
& " appid=" & AppID()
&" apptoken=cmpkw8scx5u9a5brx69m6dqxc23"
& " fn=Employee_document_package_" & MSecond(ToTimeOfDay(Now()))
& " mrgdte=11"
& " errorfid=12"
& " triggerfid=71"Configuration=bjnjxrzbu:1-7|bjnjxrzbu:4-7|bjnjxrzbu:5-7|bjnjxrzbu:6-7|bjnjxrzbu:7-7|bjnjxrzft:1-29 clientid=Q487 appid=bjnjxrkvt apptoken=cmpkw8scx5u9a5brx69m6dqxc23 fn=Employee_document_package_367 mrgdte=11 errorfid=12 triggerfid=71
Note
Outlined in light blue above is the last value in the string, which represents where the merged file will end up.
(Table A.)
Parameter | Description | Sample |
|---|---|---|
Authorization Parameters | ||
clientid | Quickbase Extensions client identifier assigned to your account during the setup process. | clientid=Q### |
appid | Unique identifier for the Quickbase app. This is used to verify that your app is authorized to use PDF Merger. | appid=appID() |
apptoken | Application token. If the Quickbase app requires application tokens, then pass a token in this parameter. | apptoken=adfsff3v55v353xxxxxx |
"Configuration String" - this is the "heart" of this type of merge operation
| ||
Configuration | Defines:
1a. Source File Format - for files coming from file attachment fields Each file to be merged is defined using the following format: {dbid}:{Record ID#}-{File Attachment field id#}
Example with multiple files: bjnjxrzbu:1-7|bjnjxrzbu:4-7 1b. Source File Format - for files coming from Amazon S3 Each file to be merged is defined using the following format: {dbid}:{Record ID#}-s3:{S3 key - field id#} If a different bucket is required when downloading from what we have on file: Example: bjnjxrzbu:1-s3:test_bucket:15 1c. Source File Format - for files coming from Dropbox Each file to be merged is defined using the following format: {dbid}:{Record ID#}-DB:{Dropbox file name - field id#} If a different folder is required when downloading from what we have on file: Example: bjnjxrzbu:1-s3:test_db_folder:15
2a. Destination File Location - for storing in a file attachment field The final part of the string (after all source files) specifies where the merged file should be stored. This must be the last definition in the string. It follows the same format as seen before: {dbid}:{Record ID#}-{File Attachment field id#} 2b. Destination File Location - for storing in Amazon S3 The final part of the string (after all source files) specifies where the merged file should be stored. This must be the last definition in the string. Notice the format below contains what is referred to as a "Custom S3 key" - this allows you to create the key in a formula field any way you need. {dbid}:{Record ID#}-s3:{Custom S3 key field id#} Or {dbid}:{Record ID#}-s3:{S3 Bucket Name}:{Custom S3 key field id#} A few notes on the above syntax:
Examples: bjnjxrzft:1-s3:29 (custom S3 key in field id# 29) bjnjxrzft:1-s3:test_bucket:29 (S3 bucket: test_bucket and custom S3 key in field id# 29) bjnjxrzft:1-s3 (the merge process uses the S3 bucket on file and generates its own S3 key) 2c. Destination File Location - for storing in Dropbox The final part of the string (after all source files) specifies where the merged file should be stored. This must be the last definition in the string. {dbid}:{Record ID#}-DB:{Merged/Dropbox file name}:{Dropbox file name field id#} Or (if not using the Dropbox folder name we have on file for you, specify it below) {dbid}:{Record ID#}-DB:{Dropbox folder name}:{Merged/Dropbox file name}:{Dropbox file name field id#} Examples: bjnjxrzft:1-DB:myDBFolder:my_merged_file:29 Notes:
3. Complete Example Configuration="bjnjxrzbu:1-7|bjnjxrzbu:4-7|bjnjxrzft:1-29" Where: bjnjxrzbu:1-7 and bjnjxrzbu:4-7 are the files to be merged, And: bjnjxrzft:1-29 is the location where the merged file will be stored. | Ex. formula text field... "Configuration=" & [DBID_TABLE1] &":1-7|" &[DBID_TABLE1] & ":4-7|" & [DBID_TABLE2] & ":5-7|" & [DBID_DESTINATION_TABLE] & ":" &[Record ID#] & "-29" |
fn | File name when stored within the file attachment field. | fn=Employee_forms_2025 |
mrgdte | This is the field id# that is updated with a completion date when the PDF Merger process is completed. | mrgdte=39 |
errorfid | This is the field id# that is updated with any error messages from the process if needed. | errorfid=45 |
triggerfid | This is the field id# of the field that indicates if the process is executing and reflects when it has been completed, as shown here:
| triggerfid=71 |
Merge using a Query
This type of merge uses a query in order to find all files to merge together. The key to this mode is the clist parameter, which lists the field id#'s for the file attachments that you want to merge together. This query may return multiple records which are all merged together. Some important parameters to point out are those that are sectioned off with a light yellow heading. They are used by PDF Merger to know where the merged file needs to end up. Additionally, there are 2 other options below this that instead allow you to move the merged file to Amazon S3 or Dropbox. Below is an example of what this formula text field might look like:
clientid=Q487 appid=bjnjxrkvt apptoken=cmpkw8scx5u9a5brx69m6dqxc23 msqry={'18'.EX.'1'} clist=3.7 dbid=bjnjxrzer S3=N mrgdbid=bjnjxrzft mrgrid=1 mrgfa=7
mrgfn=Employee_forms_2024_692 mrgdte=39 errorfid=40 slist=21 triggerfid=71Parameter | Description | Sample |
|---|---|---|
| ||
dbid | Unique identifier for the Master table. This is the table that we are storing the merged files in. You can use the function "dbid()" instead of the actual table dbid and Quickbase converts it properly. | dbid=dbid() |
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. You can use the Quickbase API documentation to help you set up the query string filter properly. Learn more about query operators in the Quickbase API documentation.
| msqry={'8'.EX.'" & [Relation2Master] & "'} |
msqid | Master table query id. This is not recommended when creating single documents. Use the report query id value in this parameter. Ex: The [List All] report is typically "1". You should create a new table report, filter the records to only display the records and file attachments that you want to have documents generated for, and save the report.
| msqid=5 |
clist | These are the field id#'s of the file attachments fields on the table you are querying.
| clist=3.6.8.60 |
slist | Field id of the field that you want to sort the records with. Used for the merger with query. | slist=24 |
errorfid | This is the field id# that is updated with any error messages from the process if needed. | errorfid=45 |
triggerfid | This is the field id# of the field that indicates if the process is executing and reflects when it has been completed, as shown here:
| triggerfid=71 |
As seen in the Simple Merge section, the following parameters instruct the PDF Merger process similarly to how the "Configuration String" works within Simple Merge, on the destination location of the output. These values allow you to direct the output to whatever table you want. Also, similar in concept to sending documents to a "Repository". | ||
mrgdbid | (Merge table dbid) When creating a merged PDF here is where you specify the table that the merged PDF should be stored within. | mrgdbid=bkt7gdjs |
mrgrid | (Merge table Record ID#) Record ID# of the record that the merged PDF will be stored within. | mrgrid=[Record ID#] |
mrgfn | (Merge File Name) This is the value that PDF Merger uses when creating the document file. There can be no spaces in the file name. | mrgfn=Employee_Forms_2025 |
mrgfa | (Merge File Attachment field id#) This is the field id# of the file attachment field that is updated with the merged PDF document. | mrgfa=7 |
mrgdte | Merged date field id. This field is updated when the merge process is completed. | mrgdte=39 |
Merge using a Query (optional) - Storing to Amazon S3
You need these additional parameters if you want to store in the Amazon S3 cloud. Similar to the "Simple Merge" section, in the Configuration string, a parameter needs to be added to store the merged file in S3, formatted like {dbid}:{Record ID#}-s3:{Custom S3 key field id#}. When using a query, use the equivalent parameters below.
Parameter | Description | Sample |
|---|---|---|
s3 | Amazon S3 integration. If the document is to be stored on Amazon S3, then this parameter should be set to "Y". | s3=Y |
s3bkt | Amazon S3 Bucket name. This overrides the bucket to use when saving files to Amazon S3. There is a default bucket set up when your account is created, and if this parameter is not passed in, the default bucket is used. This is a way to override the default bucket. | s3bkt=test_folder |
s3fid | This is the field id# of the field that stores the key value. | s3fid=12 |
s3bktfid | This is the field id# of the field that stores the S3 Bucket name. | s3bktfid=32 |
Merge using a Query (optional) - Storing to Dropbox
Similarly, if you need to store the final merged document as a PDF in a Dropbox folder, use the following parameters.
Parameter | Description | Sample |
|---|---|---|
db | If the document is to be stored in Dropbox, then this parameter should be set to "Y". | db=Y |
dbfolder | This overrides the folder to use when saving files to Dropbox. There is a default folder set up when your account is created, and if this parameter is not passed in, the default folder is used. This is a way to override the folder name. | dbfolder=test_folder |
dbfid | This is the field id# of the field that stores the Dropbox file name. | dbfid=12 |
dbfolderfid | This is the field id# of the field that stores the Dropbox folder name. | dbfolderfid=45 |