Re: Default Values and Forms 4.5

From: <stevec_at_zimmer.csufresno.edu>
Date: Fri, 24 Apr 1998 09:54:17 -0600
Message-ID: <6hq92q$4da$1_at_nnrp1.dejanews.com>


In article <6hktg7$oel$1_at_alexander.INS.CWRU.Edu>,   dw724_at_cleveland.Freenet.Edu (Dennis M. Hancy) wrote:
>
>
> Can anyone tell me what purpose of the Default Value property is in
> Forms 4.5? I have a display field on a form I created. Yet, when I
> filled in a Default Value for it, it will not display when I run
> the form. Am I possibly using the wrong property? Any help you
> could provide either via email or a posting to this group would
> be appreciate. Thanks.
>
> Dennis Hancy
> Eaton Corporation

I have found the default value property to be not much help. You need to navigate to the row in the particular block before the default value shows up.

We use pl/sql to populate fields with default values, since there are several situations that Forms cannot automatically do the job. I like to use a block-level when-validate-item trigger. It first checks that the Record Status is not 'NEW', then examines all fields in the block and if null, sets them to their respective default value. All item-level wvi triggers must have their Execution Style property set to After so that the block-level trigger runs first.

With the above trigger, nothing shows up in the row until the user enters at least one value in the row. Also, if the user blanks-out a value, the trigger replaces the null with the default value.

If you need to have a default value that ALWAYS displays, then skip testing the record status, and add code to enter the default value in the when-new-form-instance trigger.

Regards,
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 Fri Apr 24 1998 - 17:54:17 CEST

Original text of this message