I have a formatted integer field with a character prefix and leading zeros ("M9999"). I am trying to set up a smartFilter that includes this field. The style for the smartFilter is Implicit Equals but I want to use the "View as range field" option for this field but it does not work properly as a range. It will return a set of records only if the end range is left open. Is it possible to get this working without reformatting the field?
v. 9.1 E Win XP
This is a bug.
Somewhere in adm2/filter.p ApplyFilter you will see an assign statement that handles the right-hand field. The problem is due to the fact that it is using SCREEN-VALUE, which will include the format mask characters.
IF lRange THEN
+ (IF hRangeField:SCREEN-VALUE = ? THEN '?':U ELSE hRangeField:SCREEN-VALUE).
It will work as expected if changed as follows:
+ (IF hRangeField:INPUT-VALUE = ? THEN '?':U ELSE hRangeField:INPUT-VALUE).
This bug is still there in 10.2B.
adm2/filter.p hasn't changed in a 10.2B service pack as well.
Any plans to fix this issue? It does appear that it's a known issue and the resolution is also well known.
Thanks Havard. That's got it. I take it there shouldn't be any undesirable side-effects.
As far as I know we did not know about this bug before Feb 7 2011. It will be fixed in version 11.
The bug number is OE00204659 in case you want to call Support and try to get a fix in a 10.2B patch.
Replacing screen-value with input-value is generally safe. I would even categorize it as best practice. But all standard disclaimers still apply.