Newbie Oracle Forms 4.0 question about when to validate input items

From: Richard James Tinker <esuvl_at_csv.warwick.ac.uk>
Date: 4 Mar 1995 16:10:48 -0000
Message-ID: <3ja3e8$k00_at_crocus.csv.warwick.ac.uk>


What is the best way to validate Form items in Oracle Forms version 4.0 ?

I am new to Forms, and am attempting to design a data entry form for a single database table I have set up. The table has various constraints defined in the table schema, for example

Constraint Card_1 Check (Card_Number >= 1),

On the form, there is a field corresponding to this column (CARD_NUMBER). I want to validate the field if the user types in an incorrect card number (i.e one less than 1). I have done this by setting up a POST-TEXT-ITEM trigger that causes an alert box to display when the user moves the input focus out of the field after inputting an incorrect value. The trouble is, after clicking O.K. on the alert, the input focus stays at its new position and the incorrect value is left in the CARD_NUMBER item. (I tried using a GO_ITEM trigger to move the input focus back, but you cannot do this from a navigational trigger.).

I think that I am going about my item validation the wrong way. What is the standard way of validating item data as the user inputs it? I am using LOV validation on most of my fields, but a different method is clearly required here. I am using the Oracle Forms 4.0 manuals as my main reference but there are not too many examples.

Can anyone offer any advice?

Thanks in advance,

Richard

--
R.J.Tinker_at_csv.warwick.ac.uk
Received on Sat Mar 04 1995 - 17:10:48 CET

Original text of this message