Articles

Articles of interest to QuickBase folks

Constructing the Query String

When you construct a query you must build at least one query string. A query string is composed of a field ID (fid), comparison operator, and the value to be compared against (see the table below for a list of available operators). Each of these components of the query string are separated by a period, and the whole query string enclosed in curly braces, like this:

{'fid'.operator.'matching_value'}

Here is a filled-in example inside the XML tags:

<query>{'5'.CT.'Ragnar Lodbrok'}</query>

Which means, give me all the records where the fid 5 field contains the value Ragnar Lodbrok.

You can AND or OR several of these query strings together, separating the query strings with AND or OR, depending on your needs:

<query>{'5'.CT.'Ragnar Lodbrok'}AND{'7'.CT.'Acquisitions'}</query>

Heres the same thing as the above XML, but as you would include in a URL

&query={'5'.CT.'Ragnar Lodbrok'}AND{'7'.CT.'Acquisitions'}

You can get the fids for a table by calling API_GetSchema, or from any call to API_DoQuery that sets the <fmt> parameter to structured.

 

Comparison Operator

Description

CT

Contains

XCT

Does not contain

EX

Is

TV

True Value (compares against the underlying foreign key or record ID stored in relationship fields. Also used for queries on user fields.

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

Comments

RE: 'How to pass variables in query string of doQuery method of'

Hello,

 

Our SDKs are actually community-supported, so I would definitely ask about this on our LiveCommunity forum to see how people are passing the query strings in the Java SDK:

https://quickbase-community.intuit.com/

 

Thanks!

Brian

Intuit QuickBase

How to pass variables in query string of doQuery method of Java

How to pass variables in Query string built for Java QuickBaseClient. For example if doQuery is called on QuickBaseClient which takes query string parameter. 

String device = "Samsung";

doQuery(tableId, "{'6'.CT.$device}", "a", "", "");

How to pass device variable in query string "{'6'.CT.$device}"?

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.

© 1997-2014 Intuit Inc. All Rights Reserved.

Online Database VeriSign Secured Web Based Software TRUSTe Certification Online Database SSAE Audit