Solved

forms / trigger question

Posted on 1998-04-05
13
1,872 Views
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?

Thanks,
Martin Meadows
0
Comment
Question by:mmeadows
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 

Expert Comment

by:jih
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'.

/Jesper
0
 

Author Comment

by:mmeadows
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?

Thanks,
Martin Meadows


0
 
LVL 1

Expert Comment

by:slinky
ID: 1083004
Are we to assume you are working with Forms v3?
If not which version of forms are we looking at?
0
Industry Leaders: 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

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

Martin

0
 
LVL 2

Expert Comment

by:frankr
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.

key-exeqry
  .
  .
  your code here
  .
  .
  execute_query;
end;
0
 

Author Comment

by:mmeadows
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.
0
 
LVL 2

Expert Comment

by:frankr
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.
0
 

Author Comment

by:mmeadows
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?
0
 
LVL 2

Accepted Solution

by:
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.

www.iouga.org and www.odtug.com
0
 

Author Comment

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

M. Meadows
0
 

Author Comment

by:mmeadows
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 ...
0
 
LVL 2

Expert Comment

by:frankr
ID: 1083013
Oops.  Sorry, should be www.ioug.org (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.
0
 

Author Comment

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

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

martin
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

707 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