How to add filter on node list in a custom module?
If you are using Views 3 and within CCK you have listed allowed values for the field in question, you can set it up like this.


Select the field in question with the allowed values option, eg, in Filters, select 'Content: Field Name (field_name) - ALLOWED VALUES'
Click on EXPOSE.
Click in the values and select them all.
Click Limit list to selected items.
Save it.


You should now have an exposed filter with a drop down that limits the view to that field.