Invoking a Sub-Query

A sub-query can be invoked from an expression using the 'query()' function.

name in (query('all names'))

In this example, the results returned by the query, 'all names', are used as the list value. The query must be defined in the query registry. If the sub-query expects parameters (user variables), the variable values can be passed to the sub-query in the function call.

name in (query('all names', state = state)

One or more parameters can be added to the call as needed. Each variable is passed in as a name-value pair. In this example, the name of the variable is 'state', and the value of the variable is the 'state' node value in the current record. Any name values can be used as the variable value, including variables, sub-queries, nodes or attributes, and constant values.

<< Sub-Query © 1996-2013 InetSoft Technology Corporation (v11.5) Walkthrough: Designing the Sub-Query >>