interface data_table set row
Allows you to alter the rows in a data table field.
The data table is similar to a excel workbook where a categorized data can be stored as array, locating each item by its row and column index. The data table can be created on a dialog box and the data is displayed using this command.
The row properties of a data table can be edited using the ‘set row’ command.
Format:
interface data_table set row |
|---|
data_table_name = | an existing GI_data_table |
use_row_selected = | true_only |
range = | integer |
indices = | integer |
strings = | string |
reals = | real |
repeat_strings = | boolean |
enabled = | boolean |
action = | col_action |
execute = | boolean |
Example:
interface data_table set row & |
|---|
data_table_name = | .gui.atv.dtable & |
indices = | 2,4 & |
strings = | none & |
action = | replace & |
repeat_strings = | yes & |
enabled = | yes & |
execute = | yes |
Description:
Parameter | Value Type | Description |
|---|
data_table _name | An Existing GI_data_table | Specifies the name of an existing data table |
use_row_selected | True_only | Specifies the range of rows to be altered |
range | Integer | Specifies the range of rows to be altered |
indices | Integer | Specifies the range of rows to be altered |
strings | String | Specifies the new STRING contents for the cells in the row |
reals | Real | Specifies the new REAL contents for the cells in the row |
repeat_strings | Boolean | Specifies whether same STRING or REAL contents will be inserted to all marked cells |
action | Col_action | Specifies the mode of insertion of new contents in to the cells of the row |
enabled | Boolean | Specifies if the rows are read only or editable |
execute | Boolean | Specifies if the command is to be executed or not on row cell change. |
Extended Definition:
1. The contents of an existing cell of a data table can be altered using the ‘SET’ command. The cells which will be altered can be specified by multiple – mutually exclusive – choices like ‘use_row_selected’, ‘range’, or ‘indices’. The parameter ‘use_row_selected’ can directly indicate the cells to be affected. Alternatively, the range of rows can be entered in the ‘range’ or indices parameters. Specifying the range as ‘1,6’ or entering respective row numbers as ‘1,2,3,4,5,6’ will alter the rows with indices 1 through 6. As the three parameters namely, 1) use_column_selected, 2) range, and 3) indices are mutually exclusive, any one of the parameter is sufficient to specify the rows to be altered.
2. If the cell contains the same strings or reals as the one to be entered after alteration, then whether the strings is to be repeated or not is decided by the parameter ‘repeat_strings’. If the ‘repeat strings’ is set to ‘yes’ then all the cells in the rows will be replaced by new contents. On the other hand, if the ‘repeat_strings’ is set to ‘no’, then only first cell of the row will be replaced by the new contents, hence the new contents will appear only once in each row. If the values are repeated for all the cells in a row then the parameter ‘repeat strings’ need to be set to ‘yes’.
3. The parameter ‘string’ or ‘real’ is used to specify the new contents of the cell which may replace, append or prefix the existing contents of the cell. To specify how the new contents would be inserted in the existing cell contents, the parameter ‘action’ which has multiple options like ‘replace’, ‘append’, or ‘prefix’ is used.
4. The parameter 'enabled' is used to specify if the specified rows can be editable or otherwise. The rows are specified using the use_row_selected/range/indices parameter as discussed earlier.
5. The parameter ‘execute’ specify if the ‘command’ specified in data_table create interface is to be executed or not on each cell change in a row.
Tips:
The parameters ‘use_row_selected’, ‘range’ and ‘indices’ are mutually exclusive. Any one of those is sufficient to indicate the cell to be altered.