Previous Topic: Running a Sub-QueryNext Topic: Parameters


RunQuery Calling Sequence

The following is the syntax for RunQuery:

RunQuery('name','major','parameters','sync','popup','minor','type','category','target');

where:

name

Specifies the name of the sub-query search.

major

Optional. Specifies the major version number of the sub-query search (default is 1).

parameters

Optional. Specifies the parameters for the sub-query either as an XML fragment (see below) or as a javascript array of parameters.

sync

Optional. When true, specifies that the sub-query should be run synchronously (default is false).

popup

Optional. When true, specifies that the sub-query should display its results in a popup window (default is false).

minor

Optional. Specifies the minor version number of the sub-query (default is latest).

type

Optional. Specifies the sub-query type (default is 'published').

category

Optional. Specifies the category (sub-folder) of the sub-query (default is '').

target

Optional. Specifies the target page for the results of the sub-query (default is 'search-results').

The order of parameters is designed to define those that are most often used first, allowing later parameters to be omitted. As a minimum, only the name of the sub-query needs to be defined:

RunQuery('My Sub-Query');