QUERY# returns a Telitab subset on the basis of a set of search criteria
QUERY#(Telitab$, UnfoldPar$, Arg_1$[:ParLab_1$], .., Arg_n$[:ParLab_n$])
Arguments
are the query arguments. These can be string parameters or string values.
Unfolding data
To unfold a Telitab set for a particular parameter implies that the record(s) containing this parameter are moved to the top of the hierarchy.
So if Telitab_1$ contains the dataset:
To explain the data:
you have two objects, MODELS and PROJECTS presented as list values in Telitab_1$ containing TeLiTabs themselfs (with several parameters).
LPP is part of the MODELS object (TeLiTab).
When you unfold Telitab_1$ dataset on parameter "LPP", you get:
You see that PROJECT still is a separate object (and presented as a list value in Telitab_1$). All other data (which was part of the MODELS object) now is part of Telitab_1$ and thus a table in the TeLiTab.
To unfold a Telitab set for a particular parameter implies that the record(s) containing this parameter are moved to the top of the hierarchy. If UnfoldPar$ = "NullString", no unfolding is performed.
Query data
The list contains a set of values or criteria for which a set of records has to be selected from the source data Telitab$.
Again we use Telitab_1$ with the query:
for ARG1$ = "<140" and ARG2$ = ">7.5" returns the following result:
You see that the result in both unfolded on and queried on and .
Please visit the forum topic: Select an item from a dataset for an example of QUERY# in combination with data in a dataset.
Quick links: Function overview