Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Auto-querying in a form - Newbie Question
Steve,
You can set the new form with a property that I beleive makes it AUTO_QUERY when it is invokded. Pass the parameter (your GLOBAL) by calling the new form with a parameter list (The forms docs are pretty clear on how to do this). Use this parameter in the WHERE clause attribute of the new form's starting block's property sheet. For any block you ever want to query, you can set a default condition with the WHERE property. This comes in very handy.
Jason
Greg Williams <greg.williams_at_lambdaconsulting.com> wrote in article
<35D47AC5.718E63AB_at_lambdaconsulting.com>...
> Hello, I'm not sure exactly how basic this question is, but it's
> something that I've never been able to figure out.
>
> I have a form that asks the user for a certain code. A
> WHEN-VALIDATE-ITEM trigger saves the value as :GLOBAL.code
> (:GLOBAL.code := :CO_CODE_BLOCK.CODE;)
> From there a button is pressed and another form is called.
> On the other form, the first field that it comes across is another CODE.
>
> 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.
>
> Thank you very much.
>
> Steven Karam
>
>
Received on Sun Aug 16 1998 - 10:05:43 CDT