Home » Developer & Programmer » Forms » Explain the code in KEY-CLRFRM
Explain the code in KEY-CLRFRM [message #597332] Thu, 03 October 2013 05:24 Go to next message
mist598
Messages: 979
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I saw code in KEY-CLRFRM trigger,Please explain me the below code please..
Declare
  Itm1 varchar2(30) := :system.trigger_item;
Begin
  CLEAR_FORM(NO_VALIDATE,FULL_ROLLBACK);
  :B1.NEW_FORM := :SYSTEM.CURRENT_FORM; --Here B1 is the Block Name
  Go_Item(Itm1);
End;


Thanks,
Mist
Re: Explain the code in KEY-CLRFRM [message #597335 is a reply to message #597332] Thu, 03 October 2013 05:30 Go to previous messageGo to next message
Littlefoot
Messages: 19684
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Declare
  -- LF: store item for which the trigger is firing into Itm1 variable
  Itm1 varchar2(30) := :system.trigger_item;
Begin
  -- LF: clear form, i.e. remove all records from the form. By default, input focus
  --     is the first item of the first block
  CLEAR_FORM(NO_VALIDATE,FULL_ROLLBACK);

  -- LF: store name of the current form into a block item
  :B1.NEW_FORM := :SYSTEM.CURRENT_FORM; --Here B1 is the Block Name

  -- LF: You don't want to set focus to the first item of the first block (as CLEAR_FORM does), 
  --     but the item you saved into Itm1 variable within the DECLARE section
  Go_Item(Itm1);
End;

You could have opened Forms Help and read what all of that means; it's still not too late, try it!
Re: Explain the code in KEY-CLRFRM [message #597336 is a reply to message #597335] Thu, 03 October 2013 05:36 Go to previous message
mist598
Messages: 979
Registered: February 2013
Location: Hyderabad
Senior Member
Thank You Very Much Littlefoot..


Regards,
Mist. Smile
Previous Topic: Forms Help
Next Topic: Enable_list_lamp is not working
Goto Forum:
  


Current Time: Tue Oct 21 04:10:09 CDT 2014

Total time taken to generate the page: 0.08681 seconds