promptok

Kapp, Jason Jason.Kapp@COGNOS.com
Fri, 4 Jun 1999 04:00:38 -0400


Hi Terry,
 
I have seen the answer that has been given already and I thought I would
explain why what you originally had didn't work.
There are ten main steps in Accept verb processing the input procedure is
step two, prepare for edit is step 3. As part of step 3 the length of
fieldtext is checked and if it is greater than zero promptok is set to true.
So the reason your code will not work is that promptok has not yet been set
for the current field.
The code you should use to check for null entry in the input procedure is.
 
    IF 0= SIZE(FIELDTEXT)
 
Regards
 
Jason Kapp
 
Senior Trainer
Cognos Ltd (Manchester,UK)
 

-----Original Message-----
From: Terry Pickering [mailto:pickering@myself.com]
Sent: 03 June 1999 23:46
To: powerh-l@lists.swau.edu
Subject: promptok



I have a quick screen where the temporary item T-QTY-REMAINING is used to
allow the user to "skip" entering a value into the field PO-QTY as long as
T-QTY-REMAINING is greater than zero. When it's zero, then the user must
enter something into the field. This part works just fine. However when
T-QTY-REMAINING is less than or equal to zero, it issues the error message
and reprompts for the PO-QTY value. After now entering a value, it still
issues the error message. 


In debug, it shows that after the error is issued AND you re-enter a value
--- the predefined condition PROMPTOK is still FALSE. I would expect it to
now be TRUE since it executed the accept verb again and a value was entered.
This is not happening though. 


Our platform is VAX 710.F4 




PROCEDURE INPUT PO-QTY 

BEGIN 

IF NOT PROMPTOK AND T-QTY-REMAINING > 0 

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

ELSE 

ERROR "YOU MUST ENTER A QUANTITY" 

END 



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

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.