Hello,
I know this may be easy but I want to find the easiest way to code this. I have a temp table that is populated.
I like to use the up and down arrrow to navigate through the records.
I like to use the F5 key to delete the record I am on. On F4, I like to exit out of the loop. Once I am out of the loop (For each), I am showing what the table looks like after the update/delete, etc.
Here is the code I have:
def var i as int.
def temp-table temptb
FIELD temp_addr as char
FIELD temp_domain as char
FIELD temp_name as char.
do i = 1 to 5:
create temptb.
assign temp_addr = string(i)
temp_domain = "villi"
temp_name = string(i) + "Name".
end.
FORM
temp_addr label 'ID' skip(1)
temp_domain label 'Domain' skip(1)
temp_name label 'Name' skip(1)
with frame framea row 5 title 'Business Info'.
/* updating, deleting the record. I would also like to navigate to the next and previous records*/
for each temptb no-lock with side-labels frame framea :
update temp_addr.
display temp_domain temp_name.
/* F5 to delete the current record, F4 to exit from the loop Use the up arrow
to go to the previous record, use the down arrow to to go the next record*/
end.
/* look at the updated records */
for each temptb no-lock:
display temptb.
end.
I know this may be easy but I want to find the easiest way to code this. I have a temp table that is populated.
I like to use the up and down arrrow to navigate through the records.
I like to use the F5 key to delete the record I am on. On F4, I like to exit out of the loop. Once I am out of the loop (For each), I am showing what the table looks like after the update/delete, etc.
Here is the code I have:
def var i as int.
def temp-table temptb
FIELD temp_addr as char
FIELD temp_domain as char
FIELD temp_name as char.
do i = 1 to 5:
create temptb.
assign temp_addr = string(i)
temp_domain = "villi"
temp_name = string(i) + "Name".
end.
FORM
temp_addr label 'ID' skip(1)
temp_domain label 'Domain' skip(1)
temp_name label 'Name' skip(1)
with frame framea row 5 title 'Business Info'.
/* updating, deleting the record. I would also like to navigate to the next and previous records*/
for each temptb no-lock with side-labels frame framea :
update temp_addr.
display temp_domain temp_name.
/* F5 to delete the current record, F4 to exit from the loop Use the up arrow
to go to the previous record, use the down arrow to to go the next record*/
end.
/* look at the updated records */
for each temptb no-lock:
display temptb.
end.