Can someone help me with the following matter :
Case -
End-users verify that they received (a) product(s), Then they will be prompted to enter a Serial number for these products
( with OkCancelEdit ). This can also be done to more then 1 product at a time ( throughout a view ). So its used in a loop to get all the serialnumbers. But when u press cancel the serialnumber field stays empty. But i want to break the loop when u press the button ontop of the prompt
Summary -
Im trying to find a good way get a unique value from a OkCancelEdit workspace.prompt when pressing the close button
All i could find out is that it returns a empty string ( same as Cancel button , and same as entering No value )
Can someone help me with the matter
Thanx in advance
Subject: RE: OkCancelEdit Prompt
There is no way to “intercept” the Cancel button in macro language. You would have to use LotusScript for that.
Subject: RE: OkCancelEdit Prompt
Well, the prompt is created in lotusscript. and so is the rest of the code. So what is the return of the Close button of a prompt (OkCancelEdit Prompt) ? from what i can see it returns the same value as a No input Ok , a Cancel push
Subject: RE: OkCancelEdit Prompt
The Designer help for PROMPT_OKCANCELEDIT is not exactly correct about if you press OK (the method returns a string for this one, not an array of strings as the help document implies), but it is correct about the return value for Cancel, which is the special value EMPTY. If they leave it blank and press OK, the string “” is returned. So you can detect a cancel using the IsEmpty function, as shown in the Designer help document “Examples: Prompt method,” example #5.
EMPTY is not a value you can store in a string variable, so you must use a Variant variable to get the value from Prompt method. If you do someStringVar$ = wksp.Prompt(PROMPT_OKCANCELEDIT…), LotusScript helpfully converts the value EMPTY into the string “” so that it can be stored. This makes it impossible to distinguish between cancel and blank input.
I have submitted a correction to the documentation re: array of strings.