Skip to content

Query Records

Robert S.W. Carroll edited this page Jun 29, 2022 · 2 revisions

Querying for records is one of the most useful features of the Quickbase JSON API. Querying records with QJAC can be done using the following code

Basic Example

response = client.query_records(table='tableId', select=[3, 6, 12], query='queryString')
data = response.data()

Where tableId is the ID of the table you wish to query from, fids is a list of field IDs you wish to receive and queryString is a quickbase query string.

Adv. Example

from quickbase_json.helpers import Where
# have static fids for table/records
NEEDED_FIDS = [3, 6, 12]
# build query str where 3 is either 130, 131 or 132
# https://help.quickbase.com/api-guide/componentsquery.html
q_str = Where(3, 'EX', [130, 131, 132]).build(join='OR') 
response = client.query_records(table='tableId', select=NEEDED_FIDS, query=q_str)

In this example, we use the Where() helper. This can make building complex QuickBase queries easier.

The Where() helper documentation can be found here.

Multi-query Feature

Clone this wiki locally