Programming Guide |
Clears data in widgets
int sm_tm_command ("CLEAR [tableViewName
[tableViewScope
] ]");
tableViewName
- The name of a table view in the current transaction. This parameter is case sensitive.
If
tableViewName
is specified, the command is applied according to thetableViewScope
parameter. Since the entire table view tree might not be included, this is known as a partial command, andsm_tm_command
setsTM_FULL
to 0.If
tableViewName
is not specified, the command is applied for each table/server view, starting with the root table view. This is known as a full command, andsm_tm_command
setsTM_FULL
to 1.tableViewScope
- One of the following parameters, which must be preceded by a table view name.
TV_AND_BELOW
which applies the command to the specified table view and all table views below it on the tree. If no parameter is specified, the transaction manager acts as thoughTV_AND_BELOW
was supplied.BELOW_TV
which applies the command to the table views below the specified table view.TV_ONLY
which applies the command to the specified table view only.SV_ONLY
which applies the command only to the table views of the specified server view.
CLEAR
clears the data displayed on the screen for any widget belonging to a valid table view.CLEAR
has two major uses:
- Clears onscreen data so that you can enter selection criteria for a subsequent
VIEW
orSELECT
.
- Clears onscreen data so that
SAVE
processing deletes the database rows represented.
In order to delete rows from the database, the table view must be updatable. If the table view is non-updatable, the data is cleared from the screen, but SQL
DELETE
statements are not issued.The
CLEAR
command does not change the transaction mode.Push buttons and menu selections for the
CLEAR
command can choose to set the class property toclear_button
. By default,clear_button
is active in all transaction modes.
To delete rows,
CLEAR
must be followed by theSAVE
command.To perform a query-by-example, execute
CLEAR
before entering a value for theSELECT
orVIEW
commands.
The following request events can be generated by the
CLEAR
command to ascertain whether the changes from the previous command have been saved and, if desired, discard those changes: