Re: forms / trigger question

From: <stevec_at_zimmer.csufresno.edu>
Date: 1998/04/06
Message-ID: <6gc6o4$3dr$1_at_nnrp1.dejanews.com>#1/1


To answer your questions from the first post, the default action for Key-EntQry is Enter_Query; for Key-ExeQry is Execute_Query;

[Quoted] Is your block B1 a base-table block like B5? If so, your key-exeqry trigger could do:
  Execute_Query;
  Go_Block('B5');
  Execute_Query;

If block B1 is just a control block, just omit the first Execute_Query above.

As for how to get the query for B5 to use the values from block B1, just set the where clause in the B5 block properties in the Forms Designer to:

       bmh_so_# = :block1.bmm_so_#
   and bmh_so_item_# = :block1.bmm_so_item_#
   and bmh_so_chg_# = :block1.bmm_so_chg_#

If block B1 is a base-table block and you can have a situation where rows exist in your B5 table (bmh?) but not in the B1 table (bmm?), then you will need to do some special work: From your B1 pre-query trigger, get the block's Default_Where clause (using get_block_property), and create a Default_Where clause for block B5.

More below...

In article <35295E36.6544_at_indy.net>,
  mmeadows_at_indy.net wrote:
>
> It's been suggested that I use the pre-query trigger
> instead of the key-exeqry trigger. So 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.
> Why won't it work without INTO?

Because as soon as you write "SELECT...", you have switched over from using all the default processing features in Forms to go-it-on-your-own manual processing. No more base-table block; it's all control-block processing. You then have to write pl/sql code to do all record navigation, database updating, etc. on your own.

> Thanks,
> Martin Meadows

P.S. Please post Forms questions just to the cdo.tools newsgroup. There is no need to post twice, to cdo.misc and also cdo.tools. Or if you must, just cross-post to both groups at the same time.

Hope this helps,
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table.

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Apr 06 1998 - 00:00:00 CEST

Original text of this message