type_="dump"

Using type_="dump" creates a button that saves the current dynamic state of the QuickApp into a table consisting of a single row with one column per dynamic variable name.

Description

By default, the values of all dynamic variables in the QuickApp will be saved to a table in your My Data folder with the title "QA configuration dumped at YYYYMMDD HHMMSS" (where YYYYMMDD HHMMSS is the timestamp).

Additional attributes can be specified to customize the configuration dump. These attributes allow you to specify the folder in which the new table is created, the title of the table, the variables to include in (or exclude from) the configuration file, access permissions, and whether to replace the table or append to it. Valid attributes are presented below the syntax example.

By default, the button is labeled with the text Save; however, you can specify a different button label using the text_ attribute.

To load the values previously saved to a table using <widget class_="button" type_="dump">, use <widget class_="button" type_="config">. See the example in this topic as well as type_="config" for more information.

Syntax

<dynamic [DUMP_TABLE_NAME]="">
    <widget class_="button" type_="dump" value_="@[DUMP_TABLE_NAME]"/>
</dynamic>

Attributes for type_="dump"

vars_
A comma-separated list of variables that specifies which variables to include in the configuration dump.

The default is all variables.

excludevars_
A comma-separated list of variables that specifies which variables to exclude from the configuration dump.
dumppath_
Either the folder in which a new table will be created for the dump, or a table path.

If a table path is specified and the table already exists, an error will occur unless dumpmode_ is specified.

dumpmode_
If a table path has been specified for dumppath_, this indicates whether to replace the table or append to it.

Valid values for dumpmode_ are:

replace
Replace the table specified by dumppath_.
append
Append to the table specified by dumppath_.
dumpusers_
A comma-separated list of users that have access to the table containing the configuration dump.

If dumpusers_ is not specified, access permissions are inherited (i.e., the users that have access permissions to the folder that the table is in will have access to the table).

If dumpusers_="", only the owner will have access to the table.

dumptitle_
Specifies a title for the table containing the configuration dump.
value_
Upon successful completion, the dynamic variable specified in this attribute is set to the table path of the saved configuration dump.

For example, if value_="@config_file", the value of the dynamic variable @config_file will be the table path where the configuration dump was saved.

Note: When the dumpmode_ is set to replace or append, the value of the dynamic variable will not change.
dumptsvalue_
Upon successful completion, the dynamic variable specified in this attribute is set to the timestamp each time the dynamic state is saved.

Example

<dynamic output="" load_table="" dump_table="">
      <widget class_="button" dumptitle_="Doc Widget HTML" 
       height_="22" type_="dump" value_="@dump_table" vars_="output"/>
      <widget class_="button" invmode_="hide" disabled_="{@load_table = ''}" 
       type_="config" update_="auto">
        <if test="{@load_table<>''}">
          <then>
            <base table="{@load_table}"/>
          </then>
        </if>
      </widget>
      <widget accept_="table" class_="browser" dropheight_="250" 
       filter_="table" holdfor_="{@dump_table}" inputwidth_="400" 
       label_="Select file to load:" labelwidth_="130" path_="uploads" 
       show_="title" update_="auto" value_="@load_table" showtimestamp_="1" 
       sortby_="time" sortdir_="down"/>
    </layout>
    <layout>
      <widget class_="textbox" base_="pub.demo.retail.item" height_="800" 
       width_="800" mode_="rich" value_="@output"/>
      <ignore>
        <layout width_="500">
          <widget class_="text" text_="{@output}"/>
        </layout>
      </ignore>
    </layout>
  </layout>
</dynamic>