QDESIGN LOOKUP question

Edis, Bob bob.edis@fleetpride.com
Wed, 17 Jan 2001 09:54:36 -0600


G'day Jeff

Have you tried using a silent field to do the validation?  Put this
immediately after your data field and create input and edit procedures for
it.  Then you can do a get on the file in the procedure.

E.g.

TEMP sitem

FIELD ditem ...
FIELD sitem SILENT

PROCEDURE sitem EDIT
BEGIN
  LET sitem = '000' + ditem
  GET dfile VIA fitem USING sitem
  IF NOT ACCESSOK
  THEN BEGIN
         LET sitem = '001' + ditem
         GET dfile VIA fitem USING sitem
         IF NOT ACCESSOK
         THEN BEGIN
                ERROR "*E* Duffus alert!  Wrong value entered."
              END
       END
END


Or something like that.  Haven't had much time to think about it though.

Regards,
Blue

-----Original Message-----
From: jlkeepers@mmm.com [mailto:jlkeepers@mmm.com]
Sent: Wednesday, January 17, 2001 9:34 AM
To: powerh-l@sphere.swau.edu
Subject: QDESIGN LOOKUP question




Fellow PowerHouse users,

I am in uncharted territory and was wondering if anyone could point me in
the
right direction.  What I am trying to do is validate a value entered by an
end
user.  The kicker is that the user is entering 6 digits and the validating
value
is 9 digits with either leading "000" or "001".  Is it possible to setup a
field
lookup to do the following:

     If "000" + field entry = validating value
                    valid
                else if "001" + field entry = validating value
                          valid
                         else notify end user entry not valid
                end if

I attempted this using two lookups with the first one being optional but
that
doesn't work since both lookups have to be correct.  An optional on both
lookups
would make the point of lookup useless.  Any assistance on this matter would
be
greatly appreciated.

Sincerely,
Jeff Keepers


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.