Query Tag

Use the query tag to retrieve the value of a specified data item (node) from your data source, storing the result in a newly created variable. The name of this variable can subsequently be used in other tags as a relative data reference, using ${name}.

This tag provides the ability to use the equivalent of the C# use construct.

The purpose of this tag is to create a node that can be referenced by other tags. While it can be used in other ways under some of the data providers, its results are not guaranteed for any other use.

Designed primarily to be used with large SQL databases, query tags let you save the results of a query and then later refer to the data retrieved by that query without having to re-access the database. This saves resources, because you aren't making unnecessary calls to the database (which can eat up system resources.)

To view more examples and tutorials, see the Query Tag Tutorial.

Attributes

  • select – required. Select the node (table) to equate with this variable.
  • var – required. Set this attribute to the name of the variable to equate with the selected node (data table). You may refer to this table in subsequent tags by using the ${name} construct, where name is the value you enter for this attribute. You may use letters, numbers and underscores (_), but the first character must not be a number. Spaces are not allowed. There is no length limit.

Once defined, the var variable can be used to refer to this table in other tags, using ${name}. You can refer to a specific data item in this table by using ${name.item}. If you are using an SQL data source, refer to the SQL usage section below.

Delete a Query

To delete a query, call this with a query that is a 0-length string.

Once deleted, you may no longer reference the node (table) using the variable.

The purpose of this tag is to create a node (table) that can be referenced by other tags — nothing is output. While it can be used in other ways under some of the data providers, its results are not guaranteed for any other use.