Home » Developer & Programmer » Forms » Checked and Unchecked
Checked and Unchecked [message #236904] Fri, 11 May 2007 04:49 Go to next message
u263066
Messages: 47
Registered: March 2007
Member
i have data in tabular form, and a CHECK BOX each row.

I have two button
"All", "clear"
1. all - it means its should check all
2.clear - it will deselect all
In clear button i am calling a triggger when button pressed which is like


   
      BEGIN
      
      GO_BLOCK('INVOICE_HEADER');
      First_record;
      
      
      LOOP 
      IF :System.Last_Record = 'TRUE' THEN 
      	--SET THE RECORD FIRST AND 
      :INVOICE_HEADER.REPROCESS_CHECKBOX  := 'N';
      exit;
      END IF;
      	IF (:INVOICE_HEADER.REPROCESS_CHECKBOX  = 'Y')
      		THEN :INVOICE_HEADER.REPROCESS_CHECKBOX  := 'N';
      		next_record; 
      	END IF;
      
      END LOOP;
       
      First_record;
END; 



This is working fine , when
1. I press All ..all get selected
then
Press Claer ..all get selected

which is absolutly fine

2.I check some of checkbox
then
Press Clear ....it is hanging

donot understand why
can any one help ...in suggesting what goes wrong in above code or do i need to pur Extra piec in code

Fyi..intial value is always unchecked ('N')

[Updated on: Fri, 11 May 2007 04:57]

Report message to a moderator

Re: Checked and Unchecked [message #236916 is a reply to message #236904] Fri, 11 May 2007 05:45 Go to previous message
kkinapps
Messages: 29
Registered: November 2006
Location: Hyderabad
Junior Member

Hi,

Observe that you are navigating to next record only if checkbox is checked. So when you are checking only some checkboxes and then pressing 'clear' the code gets hanged as it doesn't come out of the loop. keep the next_record statement outside if block and within the loop. This should solve your problem.

Regards
KK
Previous Topic: deploying icons
Next Topic: Reset Button Code
Goto Forum:
  


Current Time: Thu Sep 26 22:55:51 CDT 2024