Home » Developer & Programmer » Forms » Clear Record processing alternate records- URGENT
Clear Record processing alternate records- URGENT [message #86259] Wed, 15 September 2004 10:49
Samir Patel
Messages: 8
Registered: March 2002
Junior Member
I have a datablock with 10 records displayed and a Checkbox which the user clicks.

The system should clear the records that are checked and leave the ones that are not checked on the datablock.

The code only does half the number , rounds to next whole number and processes the records checked and leaves the other half unprocessed . For ex, if i check 7 records , 7/2 = 3.5 rounds to 4 and it clears 4 records and leaves the other 3 records on the

datablock .

My variable l_row_cnt will give me the number of checked rows processed .

Can someone please give me a solution to this problem......

Basically i am trying to do row by row processing and clear the records that are checked . What is the correct way to do this?

 

Please let me know soon.

Thanks,

Samir.

 

DECLARE
 v_last_record BOOLEAN;
 v_exit_loop   BOOLEAN;
 v_comments    varchar2(200);

l_proj_cnt number ;

BEGIN
  v_last_record := FALSE;
  v_exit_loop   := FALSE;
  l_proj_cnt    := 0;

   
 GO_BLOCK('B_CAPITAL_PROJECT_ID');

 First_record;

  
  LOOP --Start loop and check if Checkbox for Retired is enabled and for the records that
         --it is enabled, send the data to the retired table.
        

   IF (:B_CAPITAL_PROJECT_ID.CBX_1 =  'Y') THEN
      
      
         l_proj_cnt := l_proj_cnt + 1;  
         clear_record;
   END IF ;
    

    IF v_last_record THEN
          v_exit_loop := TRUE;
    ELSE

   Next_record;

        IF :System.Last_Record = 'TRUE' THEN
          v_last_record := TRUE;
        END IF;
    END IF;
    
     EXIT when v_exit_loop;
      
  END LOOP;

show_message('SUCCESSFULLY RETIRED -- ' || l_proj_cnt || ' Award Project to RETIRED TABLE');

END;

 

 
Previous Topic: Arabic insertion
Next Topic: forgot : canvas width changes
Goto Forum:
  


Current Time: Sun May 19 08:05:37 CDT 2024