View Full Version : Filter Grid Search Dropdown


09-07-2009, 03:20 PM
I have a grid that is based on a table called - tbl_household_financial.

The grid contains the household_id field, but the household_name field (which is meaningful to the user) is in a separate, related table.

I would like to filter the search component dropdown to show only households that are in the tbl_household_financial. However, I want to display the household name in the dropdown - rather than the ID. If I base the dropdown on the tbl_household, then I can show the name (and store the ID), but I don't know how to filter the list. On the other hand, I could base the dropdown search on the tbl_household_financial and then look up the household name field.

The problem is that I don't know how to do either - filter the list based on a variable or lookup the household name from another table.

I appreciate any guidance.

Thanks much.


09-07-2009, 04:10 PM
If you use SQL DB than you can create a view over the 2 related tables and use that for your search dropdown. The filter can be applied to the dropdown over the view.

09-07-2009, 04:25 PM
Hmmm. Thanks, Ron. I've been thinking about switching to SQL tables.

Is there a way to show the name and filter the list using DBFs?


09-07-2009, 04:45 PM
Maybe by defining a set which I believe is similar using DBF... But probably others have more experience with that.

09-07-2009, 08:21 PM
Since you are using Alpha dbf, you should be able to create a calculated field using lookup() or lookupc() since all you want to is display the name based on the household_id. You could use your calculated field to search against or to display.

09-08-2009, 11:27 PM
Thanks, Michael. That's just what I needed.