promptok - WORKAROUND

Paul Howard paul@synergy.co.za
Fri, 4 Jun 1999 10:33:21 +0200


Hi Terry,
The predefined condition PROMPTOK is only relevant in step 3 and after in
the accept verb processing cycle.  ie. after the input procedure.  This
means that you can programatically put a value in fieldtext during the input
procedure and PROMPTOK will be set to true straight after the input
procedure where you can test it in the edit procedure.  I believe your
workaround is the correct way of doing it.
Regards
Paul

-----Original Message-----
From: Terry Pickering [mailto:pickering@myself.com]
Sent: Friday, June 04, 1999 2:04 AM
To: powerh-l@lists.swau.edu
Subject: Re: promptok - WORKAROUND



Michael Lee suggested: 


IF (0 = size(fieldtext) or " " = fieldtext) AND T_QTY_REMAINING > 0 




I had to modify it somewhat from what he said, but here is what I ended up
with: 



PROCEDURE INPUT PO-QTY 

BEGIN 

IF (0 = size(fieldtext) or " " = fieldtext) AND T-QTY-REMAINING > 0 

THEN LET FIELDTEXT = ASCII(T-QTY-REMAINING) 

ELSE 

IF (0 = size(fieldtext) or " " = fieldtext) AND T-QTY-REMAINING <= 0 

THEN ERROR "YOU MUST ENTER A QUANTITY" 

ELSE 

NULL 

END 



Still not sure why PROMPTOK is not being re-evaluated. I did find in the
manual under the ERROR verb (chapter 12, page 1086) where it says "In many
cases QUICK backs up to a previous ACCEPT or PROMPT verb when an error
occurs". This appears to be happening because it still prompts for the
PO-QTY field. Yet it doesn't set promptok to true after it's entered. Also
under the ERROR verb, table 12.2 explains what actions are taken for certain
procedures. The INPUT procedure is not listed though. It is listed in table
12.3, but only for errors initiated by ACCEPT, REQUEST and PROMPT verbs. 


Maybe one of the wise sages of Powerhouse can further explain this. In any
case, thanks Michael for the work around. 


Terry P. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Terry Pickering Consultant Extraordinare 

Monday and Friday Tuesday - Thursday 

Portland Eugene 

(503) 245-7178 (541) 687-3416 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = 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.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.