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: 1195
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: 21808
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: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thank You Very Much Littlefoot..


Regards,
Mist. Smile
Previous Topic: Forms Help
Next Topic: Chatting Application
Goto Forum:
  


Current Time: Fri Apr 26 23:40:15 CDT 2024