Home » SQL & PL/SQL » SQL & PL/SQL » Clear Form Trigger
Clear Form Trigger [message #625] Mon, 25 February 2002 03:09 Go to next message
Greg Horton
Messages: 37
Registered: February 2002
Member
Ive been trying to create a trigger to attach to a button, so that when its pressed the blocks displayed on screen are cleared and the form is NOT exited.

Any suggestions would be much appreciated :-)

Greg
Re: Clear Form Trigger [message #626 is a reply to message #625] Mon, 25 February 2002 03:16 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
use clear_block
Re: Clear Form Trigger [message #628 is a reply to message #626] Mon, 25 February 2002 03:20 Go to previous messageGo to next message
Greg Horton
Messages: 37
Registered: February 2002
Member
Ive tried using clear_block and it clears the data in one of the blocks, but not both. Is there a way of making it clear all inputted data on the canvas, and not having to have two separate buttons?

Thanks,

Greg
Re: Clear Form Trigger [message #630 is a reply to message #626] Mon, 25 February 2002 03:37 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
write this code for when_button_pressed

declare
curform varchar2(50):=:system.current_form;
v_first_block varchar2(50);
v_last_block varchar2(50);
begin
v_first_block:=get_form_property(curform,first_block);
v_last_block:=get_form_property(curform,last_block);
go_block(v_first_block);
clear_block;
while v_first_block!=v_last_block
loop
next_block;
v_first_block:=:system.current_block;
go_block(v_first_block);
clear_block;
end loop;
end;
Previous Topic: Oracle Forms 6i Button Trigger
Next Topic: Text Box Validation Using a Trigger
Goto Forum:
  


Current Time: Fri Mar 29 02:46:26 CDT 2024