Re: FORMS 3 help needed

From: <morleb_at_cbr.hhcs.gov.au>
Date: 8 Feb 95 17:33:21 +1000
Message-ID: <1995Feb8.173321.1_at_cbr.hhcs.gov.au>


In article <D33Dyq.77C_at_iglou.com>, proberts_at_iglou.iglou.com (Phil Roberts) writes:
> When using SQL*Forms 3 how do I limit what data can be input into a field?
> I want to allow only three values to be input into the field. Only an 'A',
> 'B', or 'C' can be input. I haven't figured out how to keep other characters
> from being input in the field.
>
> As the input people do data entry they sometimes rush and enter other
> characters without checking their input. I must eliminate this through some
> means so that they can only enter the 'A', 'B', or 'C'. How is this done?
>

You can't intercept individual key strokes while the user is entering the data. The best that you can do is use an ON-VALIDATE-FIELD trigger to test the value after it has been entered. This trigger will be fired when the user attempts to navigate to the next field or presses COMMIT.

E.G.     if :field not in ('A','B','C') then
           message('ERROR');
           bell;
           raise form_trigger_failure;  -- stops navigation or commit
         end;
----------------------------------------------------------------------
Brian Morley       morleb_at_cbr.hhcs.gov.au
Dept Human Service & Health, Brisbane, Australia Received on Wed Feb 08 1995 - 08:33:21 CET

Original text of this message