StrataFrame Forum

Range Search Field in Browse Dialog

http://forum.strataframe.net/Topic30076.aspx

By Govinda Berrio - 6/16/2011

Hi all,

I'm trying to implement a range search field in the browse dialog. By default the browse seems to allow you to configure a single condition on a field when filtering, but not  >= and <= at the same time. I've tried creating 2 search fields for one column where the first is the lower bound (>=) and the second is the upper bound (<=). But I'm getting the "An item with the same key has already been added." error (I'm running SF version 1.7.3.1). I'm not crazy about this method anyway, because I would really prefer the range text boxes to be on the same line.

Is there a way to subclass a Search Field and hook into the process that builds the search fields pane to get this functionality? If so, please explain the steps involved.

In the mean time, if there is a workaround for the error I'm getting when adding 2 search fields for the same column, please let me know what that is.

Thank You,
Govinda
By Edhy Rijo - 6/16/2011

Hi Govinda,

Make sure the Search Field Name are unique in the BD definition.  By default SF will use the same name of the field, but since you will be adding the same field twice, you have to rename the 2nd one and you should be good.
                                                    
By Govinda Berrio - 6/16/2011

Thanks Edhy,  that did the trick.

Is what I'm suggesting regarding subclassing Search Fields possible?

Govinda
By Edhy Rijo - 6/16/2011

Govinda Berrio (6/16/2011)
Thanks Edhy,  that did the trick.
Is what I'm suggesting regarding subclassing Search Fields possible?

You are welcome.
I am sorry but I don't think that is possible to do without heavily reworking the base code for the browse dialog.  I use range for dates and integers all the time and have no had anybody requesting having the range in the same line, but I do understand why you would like to show it like that.