Use API_GenResultsTable to embed a QuickBase table report in an HTML page.

This call is typically used in its URL form embedded in an HTML page. When the HTML page is opened in a browser, the call runs automatically and returns results to qdbWrite() for display in the HTML page.

You can also specify that the results should be returned as a JavaScript array, in CSV format, or as tab separated values.

By default, API_GenResultsTable returns the same number of rows as would be returned in the UI. However, you can specify a different number of rows in your table by including num-n in the options parameter.

You can split a result set into several tables by calling API_GenResultsTable once for each table, using the skp option after the first invocation to skip over the records already returned.

Note: Refer to the article What are the most common actions that affect QuickBase performance? for tips on optimizing performance when creating queries.


Embedding a QuickBase report into a Web page

Use the following procedure to embed a QuickBase report into a Web page on your Web site:

  1. In your QuickBase application, create the table report that you want to embed.

    Note: API_GenResultsTable should only be used with table reports.

  2. In the HEAD section of your Web page, add the following <script> block:

    <script lang="javascript" src="https://target_domain/db/

    In this block, the target_dbid should be the table ID you want and auth_ticket should be replaced with a valid authentication ticket. (If you don’t supply a ticket, the QuickBase login form appears when the page is opened and the user will have to log in first.) You can also supply your own query here, replacing the query id (qid) above with your own query id. See API_DoQuery for information on building a query.

  3. In the HEAD section of your Web page, add the following style information:

    td.m { font-family:verdana; font-size:70%; }
    td.hd { font-family:verdana; font-size:70%; font-weight:bold; color:white;}

    By changing the attributes of these CSS tags, you can modify the format of the resulting table.

  4. In the area of the Web page where you want the HTML table to display, add the following JavaScript code:

    <script lang="javascript">


Request parameters

Parameter Value Required?

query or

qid or


Specifies the query. You can use any of these three options:

  • Use <query>{myfid.operator.value}</query> to build your own query string.

  • Use <qid>n</qid>if you want to use a saved query and want to use its query ID.

  • Use <qname>myQuery</qname> if you want to use a saved query and refer to it by its query name.

  • See API_DoQuery for information on building your own query.



A period-delimited list of field IDs to be returned. QuickBase will return values for these field IDs in the order in which you enter them here.

To return all fields in a table, set this parameter to the value a.

Omit this parameter if you want the query to return the table's default columns.



A period-delimited list of field IDs used to determine sorting as follows:


The following slist parameter sorts all records by the field whose fid is 7.


You can specify a secondary sort by including another fid in the string (separating each fid with a period)


URL example:


If you don’t specify the sort list, the default sort specified on the Report Layout page determines the order in which records are displayed.



Returns the HTML for a table as a JavaScript function named qdbWrite(). You can then embed the HTML table into a Web page by calling the JavaScript function in the area of the Web page where you want the table to display.

Set the value of the parameter to ‘n’ if you want the new look and feel introduced on Apr-12-2003.

Set the value of this parameter ‘1’ if you want the CSS styles that render the HTML table with the QuickBase look and feel prior to Apr-11-2003.



Set this parameter to 1 if you want the results returned as a JavaScript array.



A period-delimited list containing any or any combination of the following options:

  • num-n return a maximum of n records
    Note that num-n cannot be combined with the csv or tsv options.

  • onlynew return only those records marked with new or updated flags

  • skp-n skip the first n records returned by the query
    Note that skp-n cannot be combined with the csv or tsv options.

  • sortorder-A for ascending sorts

  • sortorder-D for descending sorts

  • ned to omit the edit icons in HTML table format

  • nvw to omit the view icons in HTML table format

  • nfg to omit the new and updated icons in HTML table format

  • phd for plain (non-hyperlinked) headers

  • abs for absolute URLs

  • csv for comma-separated value output format
    Note that csv cannot be combined with the num-n or skp-n options.

  • tsv for tab-separated value output format
    Note that tsv cannot be combined with the num-n or skp-n options.



A valid authentication ticket.

The authentication ticket is returned via the API_Authenticate call.

yes, one of:

  • ticket
  • username/password
  • user token


The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the QuickBase UI.

yes, one of:

  • ticket
  • username/password
  • user token


A valid application token.

yes, if the application requires application tokens


A string value that you want returned. It will not be handled by QuickBase but it will be returned in the response.



Response values

If you specify the jht option, the results are written to qbdWrite() embedded in the HTML page. Optionally, if you specify CSV or tab in the options parameter, the return will be comma separated values (CSV) or tab separated values, respectively. If you specified jsa, the JavaScript array is returned.


Sample XML Request

POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml



URL alternative


where target_domain is the domain against which you are invoking this call, for example, intuit.quickbase.com. Read about this notation.


A Sample Web Page HTML with an Embedded Table

<script lang="javascript" src="https://team.quickbase.com/db/5rh82jcq?a=API_GenResultsTable
   td.m { font-family:verdana; font-size:70%; }
   td.hd { font-family:verdana; font-size:70%; font-weight:bold;
   <table cellpadding=5 bgcolor=lightgreen>
         <td valign=top nowrap><b>A QuickBase table<br>embedded in
            a<br>page of HTML
            <script lang="javascript">


© 1999-2016 QuickBase, Inc. All rights reserved. Legal Notices.