smartFilter View as range on formatted integer field issue

Posted by pauldownie on 07-Feb-2011 13:03

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?

thanks,

Paul

v. 9.1 E Win XP

All Replies

Posted by Håvard Danielsen on 11-Feb-2011 16:22

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.

Posted by Admin on 14-Feb-2011 09:45

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.

Posted by pauldownie on 14-Feb-2011 10:02

Thanks Havard. That's got it. I take it there shouldn't be any undesirable side-effects.

Posted by Håvard Danielsen on 14-Feb-2011 10:20

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.

Posted by Håvard Danielsen on 14-Feb-2011 11:36

Replacing screen-value with input-value is generally safe. I would even categorize it as best practice. But all standard disclaimers still apply.

This thread is closed