Query tag

Overview

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 our Query Tag Tutorial.

Attributes

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.

Deleting 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.

Learn More

Query Tag Tutorial

About tags

The Tag Editor