Quick question
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Mon, 21 Apr 2003 12:30:14 -0400
Anthony
You'll need to do something like the following:
>temp t-key2 char*4 reset at startup
>temp t-key3 char*4 reset at startup
>file yourfile primary
> access via key1 using key1 request key1, key2, key3
> select if key2 of yourfile = t-key2 and key3 of yourfile = t-key3
I'd probably change the select to allow key2 and key3 to be optional. As it
is coded above the user must enter something in each of the three key
fields. Your application may require something different.
> select &
> if (t-key2 = "" or t-key2 = key2 of yourfile) and &
> (t-key3 = "" or t-key3 = key3 of yourfile)
>field key1 of yourfile
>field key2 of yourfile
>field key3 of yourfile
>procedure input key2
>begin
> if 0 = size(truncate(fieldtext))
> then let fieldtext = " " ; to ensure promptok
> let t-key2 = fieldtext
>end
Repeat this input procedure for key3.
Hope this is of use.
Regards,
JWP
-----Original Message-----
From: Arnone, Anthony [mailto:aarnone@grey.com]
Sent: Monday, April 21, 2003 12:04 PM
To: 'Pickering, John (NORBORD)'
Subject: RE: Quick question
I need the user to enter a value for all three keys then
read down one key and filter on the values of the other two keys. But where
would I use the select statement?
R/S
Anthony Arnone
Programmer/Analyst
Grey Global Group
(212) 546.1603
aarnone@grey.com
-----Original Message-----
From: Pickering, John (NORBORD) [mailto:PICKERIJ@norbord.com]
Sent: Monday, April 21, 2003 12:01 PM
To: 'Arnone, Anthony'
Cc: Powerhouse List (E-mail)
Subject: RE: Quick question
Anthony
Please provide a bit more info so we can understand what you really want to
do.
Do you want to offer the user the choice of any one of three keys to
retrieve data? If so, and the keys are properly defined in the dictionary,
then this is probably the behaviour that Qdesign would build by default.
But, since you asked a question you must mean something else.
Do you want to let the user enter a value for each of three keys and then
read down one key and filter on the values of the other two keys? If yes,
then that's what the "select" statement is for -- although you'll probably
need a couple of temporary items to hold the values of the alternate keys.
Clarification please.
Regards,
JWP
-----Original Message-----
From: Arnone, Anthony [mailto:aarnone@grey.com]
Sent: Monday, April 21, 2003 11:01 AM
To: 'powerh-l@lists.swau.edu'
Subject: Quick question
Hello all,
I am creating a screen in Quick, which I have not done for many
years and I need a little help with something. I need to find records using
3 separate keys/indexes within the same table. I know how to do this looking
up one Key/index but I have no idea how to accomplish this for three. I have
read through the manuals, and tried using the POSTFIND procedure after the
FIND procedure but with no luck. Any help would be appreciated.
R/S
Anthony Arnone
Programmer/Analyst
Grey Global Group
(212) 546.1603
aarnone@grey.com