![]() | 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
tableViewNameis specified, the command is applied according to thetableViewScopeparameter. Since the entire table view tree might not be included, this is known as a partial command, andsm_tm_commandsetsTM_FULLto 0.If
tableViewNameis 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_commandsetsTM_FULLto 1.tableViewScope- One of the following parameters, which must be preceded by a table view name.
TV_AND_BELOWwhich 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_BELOWwas supplied.BELOW_TVwhich applies the command to the table views below the specified table view.TV_ONLYwhich applies the command to the specified table view only.SV_ONLYwhich applies the command only to the table views of the specified server view.
CLEARclears the data displayed on the screen for any widget belonging to a valid table view.CLEARhas two major uses:
- Clears onscreen data so that you can enter selection criteria for a subsequent
VIEWorSELECT.
- Clears onscreen data so that
SAVEprocessing 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
DELETEstatements are not issued.The
CLEARcommand does not change the transaction mode.Push buttons and menu selections for the
CLEARcommand can choose to set the class property toclear_button. By default,clear_buttonis active in all transaction modes.
To delete rows,
CLEARmust be followed by theSAVEcommand.To perform a query-by-example, execute
CLEARbefore entering a value for theSELECTorVIEWcommands.
The following request events can be generated by the
CLEARcommand to ascertain whether the changes from the previous command have been saved and, if desired, discard those changes:
![]()
![]()
![]()
![]()