Re: forms 5 required field

From: Neville Sweet <sweet.neville.nj_at_bhp_xxx_.com.au>
Date: Tue, 29 Aug 2000 14:47:49 +1100
Message-ID: <8ofbcb$sj6$1_at_gossamer.itmel.bhp.com.au>


[Quoted] Hi Diane,

Online Help tells you why it doesn't work: "Even when Required is set to Yes, there are circumstances when an item's value could be NULL. Form Builder checks for required items as part of its validation process: each item in a new record is subject to validation, but queried data is presumed to be valid and an item is not validated unless it is changed.".

A couple of possible solutions are:
Force validation by setting the item to itself if the item is null. You could do it in a Post-Query trigger.
Ensure the item is not null yourself, before issuing Commit_Form (assuming you have attached the commit process to a trigger, eg. when-button-pressed).

Diane Johnston wrote in message <39AA6FA4.24340934_at_nospam.accesswave.ca>...
>I am working with Forms 5. My table is defined with field X which is
>numeric but is allowed to be null at the database level. In fact it has
>to be because the rows are inserted with a script, then queried in a
>form and then the null field X is updated. (inputting votes for a
>candidate running for election). I don't want field X to remain null
>when the form is saved and committed, however, but if i make the field
>attribute Required, when i "save", the form does not fail and tell me
>that the field is required which it would if the field was "not null" at
>the database level. I have tried to code various triggers but can't seem
>to get the right combination that will prevent the commit from
>happening.
>
>Ideas?
>
>email or post (pls use johnstd_at_region.halifax.ns.ca to email)
>
>D. Johnston
>--
>Diane Johnston aka The Voice Of Reason
>tvor_at_accesswave.ca
>http://www.accesswave.ca/~tvor
Received on Tue Aug 29 2000 - 05:47:49 CEST

Original text of this message