action_="savequery"
<do action_="savequery">
expands a
given 1010data query and saves the ops resulting from the expansion as a query.
(Available as of version 10.23)
Syntax
<dynamic saved_path=""> <do action_="savequery" value_="@saved_path" path_="[PATH]" folder_="[FOLDER]" queryname_="[NAME]" replace_="0|1" inherit_="0|1" users_="[LIST_OF_USERS]" title_="[TABLE_TITLE]" sdesc_="[SHORT_DESCRIPTION]" ldesc_="[LONG_DESCRIPTION]" viewmode_="data|nodata|happy" basepath_="[BASE_PATH]"> [1010data_QUERY] </do> </dynamic>
Attributes for action_="savequery"
value_
- The path where the query is saved is stored in the dynamic variable associated with
this attribute.
The variable must be declared in the opening
<dynamic>
tag of the QuickApp (e.g.,<dynamic var_name="">
). path_
- Specifies the path where the query is to be saved. The value of this attribute may be:
- the path of a directory to which the creator has upload permission, in which case a new query is created with a system-generated name in that directory
- the path of an as-of yet nonexistent query in a directory to which the creator has upload permission, in which case the new query has the specified path
- the path of an existing query or directory which the creator owns, in which case
either
replace_="1"
orappend_="1"
must be specified, and the existing object will be replaced or appended to, respectively
Note: Ifpath_
is specified,folder_
andtablename_
must not be present. folder_
- Specifies the folder in which the query is to be saved.
If
folder_
andqueryname_
are specified, it is equivalent to specifyingpath_
as [FOLDER].[NAME]. Ifqueryname_
is not specified, a new object is created in the specified folder with a system-generated name.If
folder_
is not specified, the query is saved to theuploads
folder by default, and the query name may only be specified usingqueryname_
if replacing/appending to an existing object. (Specific named objects may not be created inuploads
.)If
path_
,folder_
, andqueryname_
are not specified, the query is saved as a new object with a system-generated name in theuploads
folder.Note: Thefolder_
attribute must not be present ifpath_
is specified. queryname_
- Specifies the name of the query to be saved.
If
folder_
andqueryname_
are specified, it is equivalent to specifyingpath_
as [FOLDER].[NAME]. Ifqueryname_
is not specified, a new object is created in the specified folder with a system-generated name.If
folder_
is not specified, the query is saved to theuploads
folder by default, and the query name may only be specified usingqueryname_
if replacing/appending to an existing object. (Specific named objects may not be created inuploads
.)If
path_
,folder_
, andqueryname_
are not specified, the query is saved as a new object with a system-generated name in theuploads
folder.Note: Thequeryname_
attribute must not be present ifpath_
is specified. replace_
- Specifies whether to replace an existing query, if it exists. Accepts a
1
or0
.If
replace_="1"
, the query, if it exists, is replaced.If
replace_="0"
, the query, if it exists, is not replaced. inherit_
- Specifies whether to inherit the set of users who have permission to access this
query. The set of users is inherited from the parent folder in which the query is
saved.
If
inherit_="1"
, the set of users is inherited from the parent folder in which the query is saved. In this case, theusers_
attribute, if specified, is ignored.If
inherit_="0"
(or is not specified), the query is private to the creator (unless theusers_
attribute is specified).Permissions are not in any case modified when replacing a query.
users_
- Specifies the set of users that have permission to access this query. Accepts a
comma-separated list of 1010data user names.
If
users_
is not specified andinherit_="0"
(or is not specified), the query is private to the creator.If
inherit_="1"
, permissions are inherited from the parent folder in which the query is saved, and theusers_
attribute is ignored.Permissions are not in any case modified when replacing a query.
title_
- Specifies the title to be saved in the query informational metadata.
If explicitly specified, the query title is modified when
replace_="1"
. sdesc_
- Specifies the short description to be saved in the query informational metadata.
If explicitly specified, the short description is modified when
replace_="1"
. ldesc_
- Specifies the long description to be saved in the query informational metadata.
If explicitly specified, the long description is modified when
replace_="1"
. viewmode_
- Specifies the display mode for the query. The display mode determines how a particular
object is displayed in the web interface of the 1010data Insights Platform. The display
mode only applies to the web interface in releases of the 1010data Insights Platform
prior to Version 10 or in Compatibility Mode in releases thereafter.
Valid values are:
data
- Open the object as a query.
nodata
- Open the object as a library.
happy
- Open the object as a QuickApp.
Note: This mode will be ignored when using the web interface introduced in 1010data Insights Platform Version 10. basepath_
- Specifies the path to be used as the base table of the query.
If not specified, the base currently defaults to default.lonely. However, the query should not rely on this specific base, but rather explicitly specify its base table using the
<base>
operation. See<base>
for more information.Note: This attribute is optional and exists for pre-version 10 compatibility. In general, this mode will be ignored or treated differently when using the new GUI in version 10.