This content has been marked as final. Show 9 replies
The problem is my check box ( text_item11 ) where if I click on the record and enable the check box for two records, the insert record only saved the last record where my cursor stop. The query result show three lines, I checked print for two lines, but it only insert to my temp table the last record.
My query in block A has returned 3 records. I checked first & third record and press on button to process. My script is as below :-
WHILE :ACT_VW_GRN_LBL.text_item11 = '1'
INSERT INTO ACT_INV_GRN_LBL_TMP ( SELECT ITEM_CODE, ITEM_DESC, :A.TEXT_ITEM11 FROM ACT_VW_GRN_LBL WHERE :A.TEXT_ITEM11 = '1' AND GRN_NO = :A.GRN_NO AND ITEM_CODE = :A.ITEM_CODE );
The first record that I checked was not insert into the table. Why ?
You are checking the last check box and then pressing the Button ? So i think your loop starts with the last record .
After GO_Block check where the cursor is with MESSAGE(:SYSTEM.CURSOR_RECORD). If it gives you last record, go to first record before you start the loop.
To got to first record you can use FIRST_RECORD built-in.
Hope this helps you.