How to delete some last record on a non-database block(tabular) [message #401430] |
Mon, 04 May 2009 23:33 |
kevin_ye
Messages: 37 Registered: December 2007 Location: Shanghai,China
|
Member |
|
|
I have create a tabular layout, and I inserted 4 records in [WHEN-NEW-FORM-INSTANCE], then I created a delete button for testing.
If I choose the last continuous records(2 or more), then I cannot delete the first chosen record.
for example, if I choose the last 2 record(3'rd record and 4'th record), and press delete button, I can only delete the last record, and the third record is still on the block.
Can anyone help me to find the debug? any suggestion appreicated.
[WHEN-BUTTON-PRESSED]
--delete selected stock
go_block('selected_stock_list');
last_record;
loop
if :system.cursor_record > '1' then
if :selected_stock_list.marker='X' then
delete_record;
end if;
if :system.cursor_record = '1' then
if :selected_stock_list.marker='X' then
delete_record;
end if;
exit; --reached last record so exit loop
else
previous_record;
end if;
elsif :system.cursor_record = '1' then
if :selected_stock_list.marker='X' then
delete_record;
end if;
exit;
end if;
end loop;
--first_record;
-
Attachment: 4.JPG
(Size: 26.95KB, Downloaded 555 times)
|
|
|
|