action_="getquery"
<do action_="getquery">
places the
Macro Language code of a given query into an XML variable and/or as text into a dynamic
variable. (Available as of version 10.23)
Syntax
<dynamic textvar="" xmlvar="" basevar=""> <do action_="getquery" path_="[PATH]" value_="@textvar" xmlvalue_="@xmlvar" basevalue_="@basevar"/> </dynamic>
Attributes for action_="getquery"
value_
- The Macro Language code of the query specified by the
path_
attribute is stored as text in the dynamic variable associated with thevalue_
attribute.The variable must be declared in the opening
<dynamic>
tag of the QuickApp (e.g.,<dynamic var_name="">
). path_
- Specifies the path to an existing, accessible query object.
xmlvalue_
- The Macro Language code of the query specified by the
path_
attribute is stored as an XML value in the variable associated with thexmlvalue_
attribute.The variable must be declared in the opening
<dynamic>
tag of the QuickApp (e.g.,<dynamic var_name="">
). basevalue_
- Information related to the query's base table is stored in the dynamic variable
associated with the
basevalue_
attribute.If
basevalue_
is specified and the query was saved prior to Version 10 of the 1010data Insights Platform, the query's base table is placed in the variable.If
basevalue_
is not specified, then a<base>
operation referring to a pre-V10 query's base path will automatically be prepended to the query's ops if and only it does not already begin with a<base>
operation (ignoring<note>
and<meta>
tags) or consist solely of a<library>
tag or tags.The variable must be declared in the opening
<dynamic>
tag of the QuickApp (e.g.,<dynamic var_name="">
).
Example: Using the value
widget to display different types of
variables
The following example retrieves the Macro Language code for
pub.doc.retail.barchartex, a query that tabulates the total profit,
sales, and cost by date for the data in pub.demo.retail.item. It uses
three value
widgets to display the values of the textvar
,
xmlvar
, and basevar
dynamic variables that are populated
by the <do>
clause.
<dynamic textvar="" xmlvar="" basevar="" lwidth="75"> <do action_="getquery" path_="pub.doc.retail.barchartex" value_="@textvar" xmlvalue_="@xmlvar" basevalue_="@basevar"/> <layout arrange_="v" width_="500"> <widget class_="value" value_="@textvar" label_="value_" labelwidth_="{@lwidth}"/> <widget class_="value" value_="@xmlvar" label_="xmlvalue_" labelwidth_="{@lwidth}"/> <widget class_="value" value_="@basevar" label_="basevalue_" labelwidth_="{@lwidth}"/> </layout> </dynamic>