promptok - WORKAROUND
Fry, Mark
Mark.Fry@COGNOS.com
Fri, 4 Jun 1999 03:43:36 -0400
Hi Terry,
The reason your code didn't work is that you were testing PROMPTOK in the
input procedure. When your code issues an ACCEPT verb to prompt for a
field, there are ten steps QUICK has to go through between the beginning and
end of the ACCEPT.
1. Obtain the input into FIELDTEXT
2. Run through the INPUT procedure
3. Prepare for edit (several things, including setting PROMPTOK to true
or false, copying FIELDTEXT to FIELDVALUE for numeric items etc)
4. Perform dictionary/field edits
5. Run through the EDIT procedure
6. Store the value in the record buffer
7. Run through the PROCESS procedure
8. Put the value from the buffer back into FIELDTEXT
9. Run through the OUTPUT procedure
10. Display the value from FIELDTEXT in the field.
If you move your original test from the INPUT to the EDIT procedure, and use
FIELDVALUE instead of FIELDTEXT, it should work fine.
Best regards,
Mark Fry
Mark.Fry@Cognos.com <mailto:Mark.Fry@Cognos.com>
-----Original Message-----
From: Terry Pickering [mailto:pickering@myself.com]
Sent: 04 June 1999 01:04
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
<mailto: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.