Skip to main content
Version: 8.1

Tag Historian Query

Inductive University

Tag Historian Query

Watch the video

The Tag Historian Query provides a simple way to query data from Tag Historians. In the Tag Historian Query you can collect data from Historical Tags for specific date ranges, apply aggregates, and specify the sample size. It functions the same as a Tag History Binding and uses the same interface, so check out that page for more information on the individual properties.

Using Parameters in a Tag History Query​

The only difference between a Tag History Binding and the Tag History Query is when using indirection. In the Tag History Query, indirection is inserted directly into the Tag Path in the Selected Historical Tags section.

Assume we have a parameter named StationNumber:

Indirection is typically done using a parameter which like the rest of reporting, is the name of the parameter enclosed in { }. In the example below, I substituted the parameter 'StationNumber' into my Tag Path for the number of the station. Note that you need to manually type out the name of the parameter, including exact spelling and capitalization.

Assuming base Tag Paths like the following:

[~]station 1/paint pressure
[~]station 1/paint fill level

we can replace the "1" with a reference to StationNumber:

[~]station {StationNumber}/paint pressure
[~]station {StationNumber}/paint fill level

Click here to learn more about Tag Historian Query Syntax on the Gateway Configuration File Reference page.