Action Statement
Add new rows or columns to a table at runtime.
add to TABLE_NAME {COLUMN_DEFINITION|ROW_DEFINITION}...
TABLE_NAME
The identifier for a table.
COLUMN_DEFINITION
ROW_DEFINITION
The specifications for the column(s)/row(s) you want to insert, as described in the table Object Definition.
Description
Use this statement to add new rows or columns to a table at runtime. If the table object runs out of memory, add to does not generate response to low memory because each table's contents are separate from the rest of the ESL program's memory. To determine whether this action completes successfully, simply compare the number of rows/columns in the table before the action to the number in the table after the action.
The current visible/invisible and temporary/permanent attributes of the parent of a table affect what you can add to a table. That is, if the parent is temporary and invisible, you can perform any of the following:
insert rows
insert columns as long as the rows in the table do not contain any initial data
The initial rows will be loaded with data when you make the table permanent or visible.
If the table is permanent and/or visible, you can:
insert rows
insert columns, as long as there is less than 64 kilobytes of data in the table
Example
action NewTableContents is
copy 0 to NumCol_IV
copy " add to Table insert ... 6 columns" to MsgStr_SV
action SendMsg
add to Table_TBL
insert string column FName
width is 70 # default to text size 32
left align
heading is "Filename"
add to Table_TBL
insert integer column FSize_SV
width is 50
format is "(#,##0)"
center heading is "Size"
add to Table_TBL
insert string column FDate_SV
width is 45
text size 12 center
align right heading is "Mod.Date"
add to Table_TBL
insert string column # No name for this one
width is 45
text size 8
center align
left heading is "& Time"
add to Table_TBL
insert float column FCost_SV
width is 60
format is "($#,##0.##)"
right heading is "Cost"
add to Table_TBL
insert boolean column FBig_SV
width is 35
format is "No|Yes"
center align
center heading is "Big?"
See Also
bottom of Built-in Function
column modifiability of Built-in Function
right of Built-in Function
table Object Definition