Validating Input Fields

Chris Kelleher

Administrator
Staff member
Hi PEGgers,

I am attempting to add logic to the item mstr genl screen (sl 3.5b03) to
force our users to enter drawing & revision level. In item\f-item.i I added
the flwg validate phrases:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
item.revision colon 14
validate(item.revision <> "?" and item.revision <> "",val-rev) /*
CP01 */
t-ecn-pending colon 35
item.track-ecn colon 14
item.stocked colon 27
item.drawing-nbr colon 14
validate(item.drawing-nbr <> "?" and item.drawing-nbr <>
"",val-drawing) /* CP01 */

[/code]

The validate phrases were cut & pasted from the one on the lot-size field,
with appropriate changes. Then I compiled item/item.p & item/u-item.p,
which use this include file, near as I can tell. Everything is fine except
for one little detail. The validate logic does not work. Of course, it
DOES work for the lot-size.

Any Progress people out there that can point out my folly? I've put the
better part of a day into this already...

cheers
Chas. E. Lehnert
CPFP IS Mgr
616 847 1890 (v)
616 847 3109 (f)
 

Chris Kelleher

Administrator
Staff member
Bon Matin Chas,

Run this:
def c as char.
c = ?.
display a asc(a).
c = "?"
display a asc(a).

Unknown is ? and question-mark is "?".

Not sure it is a bug ... Except that maybe "?" in a integer/decimal is
understood as ? ...

Eric.
 
Top