View Full Version : Searching within a numeric range


12-10-2004, 08:47 AM
Ok, another search question.
I have two fields
They contain top and bottom values for the number of employees for a specific category of job (for classification purposes).

I want to modify the search so I can put in something like
Type = farmer
Employees = 10
And the search to convert this to something like

"farmer"$SEG .and. employees"=Employees_bot_range.and.employees"=Employees_top_range

Can this be done? Doesnt look like it from the genies.

Any pointers welcome.

Selwyn Rabins
12-10-2004, 09:43 AM
you can't do it using the Search Part of a grid, but you could easily do it by combining a Dialog component and the Grid component. (the Grid component would NOT have search part because the user will be entering the search criteria on the Dialog component).

you would prompt for the search criteria using the Dialog component.

then, in the Dialog component's AfterValidate event, you would use xbasic to define your filter expression.

say that the page that contained your grid was called myPage.a5w. also, say that the alias of the grid component on this page is 'comp1'.

the user to open the grid, showing just the records that you want is:


replace 'your_filter_expression_goes_here' with any valid a5 filter expression.


12-13-2004, 01:34 AM
Thanks Selwyn,

Looked at it this weekend, works well and is very flexible.