Saved Queries


ImageQuest provides a way for the Administrator to define saved searches that users may use frequently.  A list of frequent searches with their corresponding attribute index fields gives users a shortcut to locate documents. 

Saved Queries use the Parameterized ImageQuest Query Language (PIQQL), pronounced Pickle, developed by Informa Software.  The PIQQL syntax used to execute queries is similar in form to Transact-SQL. Specifically, it takes on the same basic structure as the WHERE clause of a Transact-SQL query.  However, PIQQL is not designed to be a fully-featured data querying language; its purpose is to mimic the search capabilities provided by the IQ end-user applications. This means that PIQQL does not support certain features of a native database query language.  In particular, PIQQL does not support nested queries, Attribute to Attribute comparisons, or embedded expressions.  A color coded definition of the PIQQL query syntax is described below.






Criteria | “(“ Query “)” (“AND” | “OR”) “(” Criteria “)”



Attribute Operator Value | Attribute “IN” “(“ ValueSet “)”



“[“ attribute name “]”



“=“ | “<“ | “>“ | “<=“ | “>=“ | “!=“


“NULL” | NonNullValue | ParameterPrompt



NonNullValue | ValueSet “,” NonNullValue



“’“ literal value “’“



“’{“ attribute name “:” prompt text “}’”


literal value

The actual value of the Attribute, for example an actual invoice number.


attribute name

The actual name of the Attribute as defined in IQadministrator


prompt text

The text that appears on the client search screen, for example, Enter an invoice number.



In practice, the PIQQL query is simply a string of comparisons of the form [Attribute] = ‘Value’, which can be optionally connected by the boolean AND and OR operators. Parenthesis are optional, but can be used around any part of an PIQQL query that would itself be a valid standalone query, in order to enforce proper grouping of the boolean operations. Literal values that are numeric constants do not require the enclosing quotation marks, but they are always valid. (For non-text Attributes, you must ensure that the literal value can be converted to the proper type, or the query parser will generate an exception.) The one exception to this rule occurs with sets of numeric values within a ValueSet; the PIQQL parser currently rejects a ValueSet for an IN statement if the Values are not contained within quotations.


Next to the “Select Query” field, click “New” to create a new query.


The screenshot below demonstrates a sample query.  For instance, the attribute “Client ID” is used frequently; therefore, a saved query may be helpful to the user to locate documents easily.  The query syntax is highlighted and entered as [Client ID] = ‘{?Client ID: Enter the Client ID}’.  Clicking the “Check Syntax” button will display the “Parameter Prompt” window. 




Enter a test string as shown below and then click “OK”.


The dialogue box, “Check Syntax,” will inform the Administrator that the query validated successfully as noted below.




The Administrator is redirected back to the Saved Queries screen as shown below.  Click “Save”. 


See below for other syntax examples for creating new queries.


Query Syntax Example


[Employee Number] = '{?Employee Number: Enter an Employee Number}'


Prompts the user to enter an employee number and searches across all Document Types for that value


[DocumentType] IN ('W-4', 'Form I-9') AND
([Employee Number] = '{?Employee Number: Enter an Employee Number}')


Prompts the user to enter an employee number and searches only the W-4 and Form I-9 document types for that value



Note:  To execute a Saved Query, see the ImageQuest User’s Guide.

Note:  Document type names and attribute names are case sensitive in a Saved Query.