Re: Form Builder puzzle
Date: Tue, 08 Feb 2000 00:37:00 GMT
Message-ID: <87nofc$fjt$1_at_nnrp1.deja.com>
John,
Perhaps I've dealt with a better class of users over the years, but
in my experience, if the user has data available, they will enter it -
if they do no always have the data to populate a column, and you make
the column mandatory, they will, in order to get their job done, enter
garbage, if you disallow the 'clean' garbage (impossible values like
all 0's or all 9's) you will get garbage that is harder to detect.
Best solution is to allow the nulls and encourage them to leave the
item blank if they do not have valid data to put in it. If your form
is being deployed as a webform, where customers enter their own
shipping/billing information, and your business rules require a
telephone number, that's a different case. Then, you can disallow
nulls and (at least for the USA) valiate that the area code and
exchange are legitimate for zipcode entered.
Regards,
Paul
In article <87nbnd$pgn$1_at_bob.news.rcn.net>,
"John N" <jn14624_at_yahoo.com> wrote:
> Hi All,
>
> I find a nice solution for this:
> 1. In the Property Palette of the phone# col I verify that:
> a. the datatype was set up to char
> b. the input mask was "("999")999"-"9999 (no spaces in between here)
> c. Wrote a datablock procedure that I called get_phone as follows:
> begin
> if(:tablename.phone_number is null or :tablename.phone =
0000000000)
> then
> message ('Please enter a correct phone number.)
> raise form_trigger_failure;
> end if;
> end;
> d. Create a phone_number item trigger as follows:
> get_phone;
>
> 2. Try to enter wrong data...
>
> Thanks,
> John N
>
> Brian W. Chester <bwchester_at_home.com> wrote in message
> news:2dBn4.3550$a27.117865_at_news1.rdc1.mb.home.com...
> > John,
> >
> > A check constraint at the database level will cause increased
traffic as
> the
> > database must inform the application that the insert or update
operation
> has
> > failed. As well you will have to code in exceptions to handle it
to tell
> > the user why the operation has failed.
> >
> > A number mask is probably getting close to the solution but as I
have
> found
> > out from experience only forces the user to use more zeros!. Of
course,
> > there is no way I am aware of, to ensure that the telephone number
is
> valid
> > but the things I check for are:
> > - Are all the digits the same? If so reject it,
> > - Are the first three or the last four digits identical? If so,
ask the
> > user for verification!
> >
> > HTH.
> >
> > Brian
> >
> >
> > "John N" <jn14624_at_yahoo.com> wrote in message
> > news:87mmb5$b9l$1_at_bob.news.rcn.net...
> > > Have a telephone # col in my form that was being skipped or 0's
entered
> > into
> > > by users. I want to avoid that.
> > > My solution can be (is this the best way?):
> > > 1. Set up a check constraint on the col
> > > 2. Set up a number mask on the Property for the col
> > >
> > > Anyone?
> > > Thanks,
> > > John N
> > >
> > >
> >
> >
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Feb 08 2000 - 01:37:00 CET