Home » Developer & Programmer » Forms » HIMANSHU-WHICH TRIGGERS TO BE USED WHILE CREATING FORM FOR MASTER CREATION
HIMANSHU-WHICH TRIGGERS TO BE USED WHILE CREATING FORM FOR MASTER CREATION [message #86234] Mon, 13 September 2004 21:57 Go to next message
niket oswal
Messages: 6
Registered: August 2004
Junior Member
Hello,

I have created a form(9i) for a Master table with manual menu buttons e.g. ADD NEW/UPDATE/SAVE/EXIT on the same data block. What triggers shoul I use & what should be the pl/sql on those triggers. I have already tried WHEN VALIDATE ITEM,POST FORM etc. but form is not working properly.

Please help me.

Thanx

 
Re: HIMANSHU-WHICH TRIGGERS TO BE USED WHILE CREATING FORM FOR MASTER CREATION [message #86244 is a reply to message #86234] Tue, 14 September 2004 22:20 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Following triggers are required:

ADD/NEW : KEY-CREREC
SAVE/UPDATE : KEY-COMMIT
DELETE : KEY-DELREC
EXIT: KEY-EXIT
EXECUTE QUERY: KEY-EXEQRY
ENTER QUERY: KEY-ENTQRY
COUNT QUERY : KEY-CQUERY
HELP : KEY-HELP
PRINT: KEY-PRINT
LOV: KEY-LISTVAL

HTH
Regards
Himanshu
Re: HIMANSHU-WHICH TRIGGERS TO BE USED WHILE CREATING FORM FOR MASTER CREATION [message #86282 is a reply to message #86244] Thu, 16 September 2004 23:01 Go to previous messageGo to next message
niket oswal
Messages: 6
Registered: August 2004
Junior Member
Hi,
Thanks for response.

I understand that KEY_ triggers as:
key is already predefined with some event and we want to change that event on that particular key.

What acutally I want to do is
There is form as given below:

Empno :Empno
Name :Empname

buttons: ADD_NEW UPDATE SAVE EXIT

Now If I press ADD NEW cursor goes to Empno,enter details and then save.

If I press UPDATE then it will call an LOV to select which emp. is to updated. Get all the details then save the same.

Now I want to know what triggers on buttons are to be used and what should be the pl/sql for those triggers.

Tnanks
Re: HIMANSHU-WHICH TRIGGERS TO BE USED WHILE CREATING FORM FOR MASTER CREATION [message #86284 is a reply to message #86282] Thu, 16 September 2004 23:22 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
On a Button you can write when-button-pressed(WBP) trigger.
In this when-button-trigger you may write your pl/sql.

So over here your requirement is not to know the Triggers but the built-ins to be used.

For e.g. on ADD Buttons WBP you need to write:

Declare
Begin
If :system.Form_status<>'Changed' then
go_block('block_name');
Create_record;
Else
commit;
go_block('block_name');
Create_record;
End If;
End;

Similarly on the WBP of your Update button you may write:

Declare
a_value_chosen BOOLEAN;
Begin
If :system.Form_status<>'Changed' then
a_value_chosen := Show_Lov('LOV4');
IF NOT a_value_chosen THEN
null;
else
execute_query;
end if;
Else
Commit;
End If;
End;

HTH
Regards
Himanshu
Previous Topic: Demo application developed in oracle 9i
Next Topic: Image not appearing
Goto Forum:
  


Current Time: Sun May 19 10:32:28 CDT 2024