Re: How to test if a field has been entered in SQLForms30?

From: Tim King <tcking_at_uswnvg.com>
Date: 27 Oct 92 17:23:30 GMT
Message-ID: <2808_at_uswnvg.uswnvg.com>


Riaan de Jager (a2824ag_at_sunmanager.LRZ-Muenchen.DE) wrote:
: Hi
:
: I have a number of fields which are optional on a form. When the form is
: comitted, I want to test which of these fields have been entered, and
: take different actions in a trigger depending on which ones were entered.
:
: My questions are:
:
: When you run a form, it is ready for the operator to enter a new record.
: Do all fields take on NULL as a start? In other words, what I'm getting
: at is to test if the fields are NULL/not NULL to determine if they were
: entered or not.
:
: Is there any other way to determine if a field has obtained a value?

Yes, fields do take on a null value as a default, so I simply test for null values in the appropriate trigger (i.e., PRE-INSERT):

if :block.field is NULL then
  blah blah;
end if;

The system variables SYSTEM.BLOCK_STATUS, SYSTEM.FORM_STATUS, and SYSTEM.RECORD_STATUS may also be of some use.

--
Timothy C. King
U S WEST NewVector Group, Inc.
Bellevue, Washington
(206) 450-8533
tcking_at_uswnvg.com
Received on Tue Oct 27 1992 - 18:23:30 CET

Original text of this message