Validation (OpenInsight 32-Bit)
At 23 MAR 2006 01:39:15PM Jim Vaughan wrote:
In 7.2.1 I have validation of (0.00000001,999999999) on a Edit Line; OI allows entry of zero. Is this a new bug? Or am I doing something stupid?
At 23 MAR 2006 01:57PM Warren Auyong wrote:
I just found this in v7.11 in edittable (haven't tested it in other controls):
I want to make sure text is surround with percent signs "%" e.g. %SOMETEXT%, text can be variable length
I entered the pattern "%"0Z"%"
I enter %SOMETEXT% and Form tells me: "The data must match: "%" -and- The data must contain up to 0 of any characters(s) -and- The data must match: "%"
Single quotes makes no difference.
Patterns 0Z"%" or "%"0Z work as expected. "%"5Z"%" works, but requires 5 characters to be embedded but that makes sense.
I guess I'll have to use a UDP but that carries its own set of peculiarities.
I seem to recall reporting a similar problem back in ARev 2.00
At 24 MAR 2006 01:26PM Jim Vaughan wrote:
So what's the deal with this? Is this a bug in OI? If so will it be fixed soon, or do I need to do something myself?
At 05 APR 2006 05:59PM Jim Vaughan wrote:
]] In 7.2.1 I have validation of (0.00000001,999999999) on a Edit Line; OI allows entry of zero. Is this a new bug? Or am I doing something stupid? «
Will someone please confirm that this is a bug.
If it is a bug (as opposed to something I am doing wrong) can we expect a fix anytime soon?
If no fix is going to be available what is the best work around?
At 06 APR 2006 03:38PM dbakke@srpcs.com's Don Bakke wrote:
Jim,
Obviously I'm not speaking for Revelation and I don't know whether or not to classify this as a bug but I do beleive the problem is related to precision. Check this out:
A=0.0001
B=0
C=(A=B)
C will result in 0. But if I increase the number of decimals for A like so:
A=0.00001
B=0
C=(A=B)
C will now result in 1. Your number was much smaller than this so it seems obvious to me that the validation is practicaly treating 0.00000001 as 0 in this context.
I can't think of an alternative right now other than a UDC.
dbakke@srpcs.com
At 19 APR 2006 04:50PM James Mowbray wrote:
I believe OI treats the (n,m) conversion pattern as INTEGER data mostly, so your first value is actually considered 0, so the validation passes. Try:
SUBROUTINE userconv( type, value, branch, result )
STATUS()=0
result=branch
IF type=ICONV' OR type=OCONV' THEN
STATUS()=(value * 100000000 999999999)END ELSE
STATUS()=2END
END
with 'USERCONV' as the input conversion in the form. This will verify the conversion. There will still be OI's issue of not detecting numeric changes below 4 decimal places without a precision change to contend with, but you can't have everything.
At 19 APR 2006 05:55PM James Mowbray wrote:
You'll need to add a NUM check if you're not sure the user will enter numeric data.