Re: How to test if a field has been entered in SQLForms30?
Date: 27 Oct 1992 13:13:12 GMT
Message-ID: <dewey-271092081115_at_sebastian.centerline.com>
In article <a2824ag.720175490_at_sunmanager>,
a2824ag_at_sunmanager.LRZ-Muenchen.DE (Riaan de Jager) 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?
One option is to write a post-change trigger on the fields that you want information about like:
Trigger: POST-CHANGE
Field: this_field
:global.this_field_changed := 'YES';
Then, when you get to your pre-commit trigger logic, you can just test all the global variables for their value.
You might want to set a pre_something trigger to set all these globals to 'NO' or you will run into problems testing a global that has not been set yet.
Hope this helps.
-Devan
Devan F. Dewey | Senior Systems Analyst CenterLine Software | dewey_at_centerline.com 10 Fawcett Street | "Leme esplain - no dere is Cambridge, MA 02138 | too much. Leme sum up." -Inigo MontoyaReceived on Tue Oct 27 1992 - 14:13:12 CET