Quick screen auto-find

Chris Sharman Chris.Sharman@ccagroup.co.uk
Fri, 11 Dec 1998 16:24:42 +0000


A fairly common requirement here is that we have a lookup screen (various
keys), which users use to find data in the normal way; and we'd also like to
call it from a parent screen, passing in the key/record to display (either with 
the passing mechanism or using systemvalues).

I've found no way of implementing a screen that works both ways.
I can default the access statements (or specify them to request keys),
and that always prompts the user.
I can specify an access statement that uses passed in values, and that
will never prompt the user.

What I need is an IF clause on the access statement, or a facility to push
characters into the PSIB; so that I can lookup on passed in values (if any),
otherwise find normally.

Eg
SCREEN mine

TEMP lookupby char*10 = getsystemval("LOOKUPBY")
FILE myfile PRIMARY
 ACCESS VIA key1 USING lookupby IF (lookupby<>"")
 ACCESS VIA key1 USING key1 REQUEST key1
 ACCESS VIA key2 USING key2 REQUEST key2
 etc ...

Failing that, I suppose I have to write my own PATH & FIND procedures: a
hateful practice I prefer to avoid. Any better suggestions anyone ?
______________________________________________________________________
Chris Sharman			Chris.Sharman@CCAgroup.co.uk
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.