I feel like I've had to deal with this before with the traditional controls but can't recall or find it. Now I am having this issue with the Material Design controls.
When displaying a numeric field, here the Office Number, a 0 (zero) is the default because the "Default Value" of the field is *ZERO
My issue is when I put the cursor into the field, the 0 is there creating a leading zero. That's fine for mathematical ops, but for identifiers not so much, as leading zeros can be significant.
I need it to select the entire field so that when the user starts typing, the field contains ONLY what the user has entered, i.e. no leading zero.
Double clicking will select the whole field, but my user's should have to do that.
Do I have to programmaticly select the whole field when they click it? I feel like there should be an attribute or property to control that.
VLWeb Material Design Numeric field remove leading zero
Re: VLWeb Material Design Numeric field remove leading zero
Do you have an edit code on the field? You would want a Z
Back in the 5250 days, some users just couldn't handle field exit (which would right justify the field, like a calculator almost). Sometimes we would just use a work field to accept characters and then edit it to what we needed.
In lansa of course very easy.
if #workfield.isNumber
#number := #workfield.asNumber
endIf
Back in the 5250 days, some users just couldn't handle field exit (which would right justify the field, like a calculator almost). Sometimes we would just use a work field to accept characters and then edit it to what we needed.
In lansa of course very easy.
if #workfield.isNumber
#number := #workfield.asNumber
endIf
Art Tostaine
Re: VLWeb Material Design Numeric field remove leading zero
I knew it had to be something like that.
Thanks Art!
Thanks Art!
Re: VLWeb Material Design Numeric field remove leading zero
Edit codes may be 40 years old, but they are pretty cool. 
Art Tostaine
Re: VLWeb Material Design Numeric field remove leading zero
I think LANSA calls them an "Edit Mask" setting it to 'Z' in the repo does the trick.