Insertrow
Inserts a new row into a table field.
Examples--insertrow statement:
Example 1:
The following example inserts a new row at the top of the table field display:
## activate menuitem "toprow"
## {
## insertrow empform employee 0 (ename = vname,
## sal = vsal)
## }
Example 2:
The following example uses the insertrow statement to enable the user to insert a blank row into the table field before or after the current row:
## activate menuitem "InsertBefore"
## {
## inquire_frs table empform (row = rowno(employee))
row = row - 1
## insertrow empform employee row
## }
## activate menuitem "InsertAfter"
## {
## insertrow empform employee
## }
Example 3:
The following example provides a cut and paste facility, using the deleterow and insertrow statements:
## activate menuitem "Cut"
## {
## getrow (vname = ename, vage = age)
## deleterow empform employee
cut = true
## }
## activate menuitem "Paste"
## {
if (cut = false) then
## message "you must select a row first"
## sleep 2
else
## insertrow empform employee (ename = vname,
## age = vage)
cut = false
end if
## }
Example 4:
The following example illustrates use of a null indicator variable when assigning a value to a nullable column:
## activate menuitem "NewEmployee"
## {
## insertrow empform employee
## (spouse = null, title = vtitle:null_indicator)
## }
Last modified date: 08/14/2024