How does the QuickBase query language work?
QuickBase's query language is composed of four parts:
1. A selection parameter called "query"
2. A column list parameter called "clist"
3. A sort list parameter called "slist"
4. An options parameter containing the direction of sorts and the output format
QUERY
The query parameter is composed of one or more field criteria. Each field criteria is enclosed in curly braces "{}". Internal to the curly braces, field criteria are composed of a Field ID* (a number) enclosed in single quotes followed by a period, followed by one of the following two or three letter criteria:
CT contains
XCT does not contain
EX is
XEX is not
SW starts with
XSW does not start with
BF is before
OBF is on or before
AF is after
OAF is on or after
LT is less than
LTE is less than or equal to
GT is greater than
GTE is greater than or equal to
These criteria are also enclosed in in single quotes.
An example would be:
{'0'.XCT.'Fred'}
Criteria can be combined with either one of the two words:
AND
OR
For example:
{'9'.SW.'wilma'}OR{'10'.XSW.'dino'}
COLUMN LIST
The column list parameter determines which columns are displayed and in what order. The column list is simply a list of Field IDs* separated by periods. If no column list is supplied then the "Default View" (click on the Customize menu then on Views, the default view is listed first) determines which columns and what order they are displayed in.
SORT LIST
The sort list determines the order the records are displayed in. The sort list is simply a list of Field IDs separated by periods. If no sort list is supplied then the "Default sort" of the "Default View" determines what order records are displayed in.
OPTIONS
This parameter determines the direction of the sorts specified in the sort list. The options parameter starts with the keyword "sortorder-". Following this are a list of either capital "A"s or capital "D"s. One for each Field ID in the sort list. The "A" means sort the corresponding Field ID in ascending order. The "D" means sort the corresponding Field ID in descending order.
A URL encoded QuickBase query looks like this:
query={'6'.CT.'foo'}AND{'0'.XCT.'bar'}AND{'7'.EX.'fred'}AND{'8'.XEX.'barney'}AND{'9'.SW.'wilma'}AND{'10'.XSW.'dino'}&slist=6.7&options=sortorder-AD
- Printer-friendly version
- Send to friend
- 21904 reads



Comments
Post new comment