Edit Line Validation Pattern (OpenInsight 32-bit Specific)
At 29 APR 2004 11:03:33PM Calvin Aw wrote:
Hi All,
I wish to have 2 types of validation patterns in an Edit Line. I tried to enter :
(0,3)
1N
in the validation column of the edit line. It seems that these 2 validation patterns are in OR combination but not AND combination. Means if I key in number 5, it will be accepted as it passed the 1N validation. But this is not what I wanted.
How can I enter the validation patterns so that it will be in AND combination?
Please advise. Thank you.
At 30 APR 2004 05:43AM The Sprezzatura Group wrote:
At 30 APR 2004 09:52AM Matt Sorrell wrote:
Furthermore, doesn't the (0,3) validation imply a (1N) validation?
Why make two validation calls when 1 will work?
msorrel@greyhound.com
At 30 APR 2004 11:04AM The Sprezzatura Group wrote:
We wondered that and the only logical explanation is that Calvin wishes to enforce the entry of integers.
As an aside Calvin, tradionally this would we done as (MD0)_(1,3) with an OCONV of MD0 - this way if the user typed in 1.5 it would say 2 etc.
The Sprezzatura Group
World Leaders in all things RevSoft
At 03 MAY 2004 05:18AM Bob Silverstein wrote:
I would use a radio button.
At 03 MAY 2004 07:35AM The Sprezzatura Group wrote:
Well we'd probably use a spin control but…
The Sprezzatura Group
World Leaders in all things RevSoft
At 05 MAY 2004 03:27AM Calvin Aw wrote:
Thanks guys for all your help. I was on few days holidays and just back to office today.
The (0,3)_1N is most suitable for me, as I need to enter integer from 0 to 3 and no decimal is allowed. I cannot use (MD0)_(0,3) as I do not want the number to be rounded up nor down.
The radio button suggestion is a good idea. But sadly, some of our existing customers using Windows application, avoid to use mouse as often as they can (don't understand what they are thinking), so we have to cater that too.
At 05 MAY 2004 03:36AM Donald Bakke wrote:
Calvin,
Use accelerators on your form so your users can still keep their hands on the keyboard.
dbakke@srpcs.com
At 06 MAY 2004 03:11PM Tom Savell wrote:
I am not sure this is appropriate for your application but depending on when you want to use "(0,3)" versus "1N", you could have an IF THEN ELSE statement in the event logic and programmatically write the validate string to the EditLine using the VALID property. For example to set the property for the third column in an EditTable:
validArray=get_Property( @window : ".TABLE_1", "VALID" )If A=bugger' thenvalidArray=(0,3)"End Else validArray=1N"call set_Property( @window : ".TABLE_1", "VALID", validArray )