Looping(all blocks, all records, all items) multi and single record blocks) will this work?

From: steve deno <sldcrew2k_at_yahoo.com>
Date: 5 Jun 2003 13:49:03 -0700
Message-ID: <8e6b14d8.0306051249.6ef16ddd_at_posting.google.com>



[Quoted] Hi all,

I am trying to loop through all records in all blocks and hit all items, to check their values/properties. I have a procedure and it ALMOST seems to work in the following code. However, I think that the fact of where I am navigating at which time is causing an issue. the result is that I hit all blocks andd items but not all records in multi-record blocks. to start, I see in the debugger that [Quoted] :SYSTEM.last_record has no value. Is this my problem? All help is appreciated. Thanks very much

BEGIN

  cur_frm  := :SYSTEM.Current_Form; 
  cur_blk  := Get_Form_Property(cur_frm,FIRST_BLOCK);
  lst_blk  := Get_Form_Property(cur_frm,LAST_BLOCK);
  cur_itm  := cur_blk||'.'||Get_Block_Property(cur_blk,FIRST_ITEM);
  lst_itm  := cur_blk||'.'||Get_Block_Property(cur_blk,LAST_ITEM);

  WHILE cur_blk <> lst_blk	LOOP--BLOCK--
    First_Record;
[Quoted]     WHILE :SYSTEM.last_record != 'TRUE'LOOP--RECORD--
      WHILE cur_itm <> lst_itm LOOP--ITEM	--	
        My code to be run on every item of every record of every block
in my form
        cur_itm := cur_blk||'.'||GET_ITEM_PROPERTY(cur_itm, NEXTITEM);
      END LOOP;--ITEM	--
      NEXT_RECORD;

    END LOOP;--RECORD--
    cur_blk := GET_BLOCK_PROPERTY(cur_blk, NEXTBLOCK);
    cur_itm  := cur_blk||'.'||Get_Block_Property(cur_blk,FIRST_ITEM);
    lst_itm  := cur_blk||'.'||Get_Block_Property(cur_blk,LAST_ITEM); 
  END LOOP;--BLOCK-- END; Received on Thu Jun 05 2003 - 22:49:03 CEST

Original text of this message