promptok - WORKAROUND

Terry Pickering pickering@myself.com
Thu, 03 Jun 1999 17:03:43 -0700


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.



<color><param>0000,0000,8080</param>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<bold>Terry Pickering        Consultant Extraordinare

</bold>Monday and Friday        Tuesday - Thursday

Portland                 Eugene

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

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