Page 1 of 1

inputmask - content lenght

Posted: Wed Apr 28, 2010 7:33 am
by l3whmg
Hi friends,
is there someone can help me to better understand about INPUTMASK?
I've used this (piece) of code

Code: Select all

DEFINE TEXTBOX <ControlName>
ROW ...
COL ...
....
INPUTMASK '999-999-999'
ONENTER TestField()
I don't insert any charcater and then I've pressed <Enter>. Inside "TestField()" I've used this code

Code: Select all

MsgStop(Hb_ValToExp(LEN(ALLTRIM(FormName.ControlName.Value))))
and I obtain 5 (mambo number... :lol: ). Why? I thought: I must obtain 11 - 2 = 9.
The situation it's the same if (but I think it's wrong code) I add

Code: Select all

MAXLENGHT
property to the control.

Many thanks

Re: inputmask - content lenght

Posted: Wed Apr 28, 2010 7:43 am
by Alex Gustow
Hi Luigu!
Not MAXLENGHT - but MAXLENGTH is correct (I think)

Or - if you wrote in prog correctly: "MAXLENGTH"... I don't understand why it's not work right :|

Re: inputmask - content lenght

Posted: Wed Apr 28, 2010 8:15 am
by l3whmg
Hi Alex,
many thank to you for fast replay. About MAXLENGHT He is (I am) a bad english writer :lol:
My problem it's to establish if a user enter something or not: for this reason I've used

Code: Select all

LEN(ALLTRIM(...
and I've found number 5 when I don't insert anything.
In other words: 11 charcaters - 2 separator is 9. If I test number 2 I know that user don't insert anything.

I hope you can understand my poor English :oops:

With Best Regards