forms / trigger question

Posted on 1998-04-05
Last Modified: 2008-02-01
Hello all you Oracle forms / trigger gurus,

What's the default pl/sql action of a key-entqry (enter query)?
What's the default pl/sql action of a key-exeqry (execute query)?

I need to modify the trigger action of a key-exeqry at block
level. I assume that during a key-entqry the data is collected
from the keyboard that allows a select statement to be constructed
and executed when key-exeqry trigger is fired. How do I intervene
to add an extra select statement?

Martin Meadows
Question by:mmeadows

Expert Comment

ID: 1083002
Hi Martin,

The default pl/sql action of 'KEY-ENTQRY' is ENTER_QUERY
The default pl/sql action of 'KEY-EXEQRY' is EXECUTE_QUERY

I would suggest that you modify the PRE-QUERY trigger instead of the KEY-EXEQRY. To find out more about how modify the PRE-QUERY trigger, search Forms Online Help for 'Pre-Query'. Make sure to read the topic 'Controlling Queries with Pre-Query and Post-Query Triggers'.


Author Comment

ID: 1083003
I don't seem to have the doc you mentioned. Is this doc unique
to post sqlforms30? Since you suggested I use the pre-query trigger I tried to do something like this:

select * from bill_material_hours
  where bmh_so_# = :block1.bmm_so_#
  and bmh_so_item_# = :block1.bmm_so_item_#
  and bmh_so_chg_# = :block1.bmm_so_chg_#;

I'm trying to work this select statement into block5.
The selected rows therefore depend on data that
was entered in block1. Unfortunately, I can't
compile the select statement! It's expecting
the keywork INTO after the *. This is a V3 trigger.
so why won't it work without INTO?

Martin Meadows


Expert Comment

ID: 1083004
Are we to assume you are working with Forms v3?
If not which version of forms are we looking at?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 1083005
Yes, sql*forms v3. Sorry I didn't make that clear from the start.



Expert Comment

ID: 1083006
It would help to know what behavior you're trying to achieve.  Are you trying to populate block5 based on a query in block1?

If so, you want your query in a post-query trigger on block1, and yes you need the INTO clause if you want to populate fields in the form from the query.  (Even if you DON'T need it, explicit code is generally more readable - I'm PAINFULLY familiar with trying to read the messy, undocumented code of others.)

Incidentally, the difference between a key- trigger and the corresponding trigger 'function' is that the key trigger will only fire as a response to the 'key sequence' (i.e. if the operator strikes the query key, however that's mapped), and the 'function' is what is called, by default.  The pre- or post- type triggers (e.g. pre-query) are executed whenever that function is performed (even in response to a programmatic event).

Note also that, if you use the key- trigger, your code will REPLACE the standard behavior (i.e. the call to the function); for that reason, you generally will want to finish a key- trigger with the function call explicitly, e.g.

  your code here

Author Comment

ID: 1083007
Sorry I took so long to respond. Have moved on to other things.
Frankr & Jih: thanks for the assistance & the clarification. I
guess I need to give someone credit for answering my question
now but I don't have an option to accept the answers on my screen. All I can do is enter this comment & submit it.

By the way, yes, Frankr, I was trying to populate block5 with
stuff from block1.

Expert Comment

ID: 1083008
The reason you don't have an 'accept answer' choice is that none of us have submitted any of our feedback as an 'Answer', aside from the first from Jesper that you rejected.  If you think any of the comments are most appropriate for acceptance as an answer, why don't you tell whichever one of us you choose to submit something as an answer, which will give you a chance to accept it.

If you really solved your question yourself, or if nobody in particular can be credited with the answer (there's no way to split awards), you could ask the moderator to just close the question for you without any award.

Author Comment

ID: 1083009
Frankr, I think you should get credit for providing the most
help on this so submit something as an answer & I'll grade it.
Thanks for the help. Marty

By the way, I have a couple of other open questions that I'd
like to have the moderator to close. How is that done? In a comment?

Accepted Solution

frankr earned 100 total points
ID: 1083010
I was going to tell you to go to the Customer Service topic to request help with the other questions, but I just got back from there and I think you've figured that out for yourself.

Always glad to help.

BTW, if you're looking for other places to post questions, there's the IOUG-A website discussion groups.  They're open to non-members of IOUG-A (if you aren't a member).  ODTUG has a forum, too, I believe, but I think that one's members-only. and

Author Comment

ID: 1083011
thanks to of you for helping out & thanks for the pointer to iouga frankr.

M. Meadows

Author Comment

ID: 1083012
Why does this question now say "10 points" at the top? I gave 100 points for it. Also, Frankr, the iouga web address you shared with me isn't working ...

Expert Comment

ID: 1083013
Oops.  Sorry, should be (somehow the Americas division of IOUG managed to hang onto the original domain when they divvied up the world into three big pieces).  I shouldn't ever trust my memory.

The points always drop to 10% of original for those who want to review answered questions.  Or you could look at it that the person who wanted the answer the most (the person that asked it) has to cough up 10x as many points.

Author Comment

ID: 1083014
frankr, thanks for that last little tid-bit of info. it's much appreciated.

also note, I found the address on my own when I did a web search for iouga. thanks for your reply though!


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
any step by steps guide on how to install Oracle 12c on Windows 10 8 107
Oracle 12c Default Isolation Level 17 56
Excess Redo 3 32
Oracle SQL Developer - SubString 2 29
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question