Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Auto-querying in a form - Newbie Question
Or use a PRE-QUERY trigger on the block to achieve the same result...
Paul Rosenthal
Mark Styles wrote in message <35d45181.25480008_at_news.intra.bt.com>...
>Fri, 14 Aug 1998 10:58:29 -0700, Greg Williams
><greg.williams_at_lambdaconsulting.com> rambled:
>>What I'd like to be able to do is: Pass :GLOBAL.code into this form,
>>and programmatically query CODE based on :GLOBAL.code.
>>A statement such as -
>>SELECT * FROM CO_CODE_BLOCK
>>WHERE CODE = :GLOBAL.code;
>>does not work, but is exactly what I need.
>>
>>I need to know the text for a WHEN-NEW-ITEM-INSTANCE trigger on that
>>particular field that will automatically query the database.
>
>First of all, if you're using Forms 4 or higher, I would suggest
>looking at using parameters rather than globals.
>
>WHEN-NEW-ITEM-INSTANCE is the wrong trigger to use.
>
>One way to execute the query when the form is called is to have
>something like the following in a WHEN-NEW-FORM-INSTANCE trigger:
>
>set_block_property('MY_BLOCK',DEFAULT_WHERE,
> 'code = :global.code');
>execute_query;
>
>You may not even need the set block property, you could just define
>the default where in the block properties if the form is only used for
>this purpose.
>
>Mark Styles
>Spam my account, lose your account. Clear enough?
>Religious tolerance is an oxymoron.
Received on Fri Aug 14 1998 - 11:48:41 CDT
![]() |
![]() |