DataQuery *

09.03.2021

The data query is a data object used to search for objects with shared properties and to return their data. Data on the hard drive (indexed files) or in the project database can be queried.

For instance, it is possible to search for all objects that have a particular name or a particular unit and return their data as a list.

You have the option of concatenating the results of multiple data queries. This is useful if you want to perform several data queries using shared search criteria. You can do this by having a data query return the keys of the found data objects and then using them in another data query.

Proceed in a similar manner to limit the data query to particular folders, such as to folders in which a data set exceeds a maximum value. Using your first data query, search for data sets that exceed the maximum value and have it return the keys of the parent or grandparent folders of these data sets. In a second data query, use these keys to limit the search to found parent or grandparent folders.

Consequently, long-term measurements are often stored as files that each contain a time segment of the long-term measurement. Using a data query for long-term measurements, you can query for time segments, which span several files, as a data set.

If for the data query you use Output as a list as the result, then you can specify which attribute to use for the list element names. All found often channels have the same name but come from different files. In this case, instead of the channel name, for instance, the file name is used for the list element.

For the data query you can use search criteria that refer to data, such as on the maximum of a data set. When searching for formulas and analysis objects in the project database, it is important that the current result has been indexed. You can make sure of this by making the first criterion for the data query a search criterion that does not refer to the data, e.g. the name, and selecting for the search criterion the option Update and index objects that meet the search criteria before evaluating additional search criteria. This ensures that the data in the index is current when you use a data criterion in the next step.

To be able to use the data query option, indexing must be enabled.

To query data on the hard drive, file indexing must be set up.

To query data in the project database, data indexing for the project database must be enabled.

Note Querying data on the hard disk is only possible when the Data Explorer Option is installed.

See Also

Data Object

List

Working with Data Queries

Setting Up a Data Query

Importing Data Using DataQuery

Concatenating Data Queries

Data Query for Long-Term Measurements

* This object is not available in FlexPro View and FlexPro Basic.

Share article or send as email:

You might be interested in these articles