Quick screen auto-find
Jeff Hoffman
J.Hoffman@cchs.usyd.edu.au
Mon, 14 Dec 1998 21:23:25 +1100
Simplest way is to write the path procedure, leave your access statements
as is and use the default find procedure
path
if lookupby <> " "
then let path = 1
else begin
request key1
if promptok
then let path = 2
else begin
request key2 .... etc
At 04:24 pm 11/12/98 +0000, you wrote:
>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.
>
>
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ Jeff Hoffman + e-mail: J.Hoffman@cchs.usyd.EDU.AU +
+ Director + +
+ WoniCon Pty Ltd + ,-_|\ +
+ 21 Prices Circuit + voice: +61 2 9542 1527 / \ +
+ Woronora NSW 2141 + fax: +61 2 9521 3979 \_,-._* +
+ AUSTRALIA + v +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.