Re: Forms 5.0 - Auto query on new form

From: DanHW <danhw_at_aol.com>
Date: 15 Sep 1998 05:00:11 GMT
Message-ID: <1998091505001100.BAA14975_at_ladder03.news.aol.com>


In the PRE-QUERY trigger, set the key value to the input parameter, not in the WHEN-NEW-FORM-INSTANCE. If you want every query to do this, you are done. If you only want the initial query to use this value, you will also need to clear the parameter in the POST-QUERY trigger so the next query does not use it again.

Dan Hekimian-Williams> I have a form that passes a primary key to a second form via a
>default parameter list. The second form is called with a NEW_FORM and
>tracing shows that the parameter is passing.
>
> In a WHEN_NEW_FORM_INSTANCE trigger, I set the primary key value
>from the parameter list into the parent block item for the key and
>then execute the EXECUTE_QUERY command to get the parent record and
>have the child blocks auto-fill with the correct details.
>
> Problem: The form is set to NEW status when I set the primary key
>value in the form (it asks if I want to save changes), then it clears
>the block (or whole form) and executes a full (null criteria) query.
>
> What is the trigger I should use to set block items so as not to
>have the form think I'm creating a new record? Or, how can I get the
>form to auto-query with criteria I pass to it?
>
>Russ
Received on Tue Sep 15 1998 - 07:00:11 CEST

Original text of this message