if possible, I suggest you move up to p9 or p10, where the vast majority of users and developers are.. that way, if they give you code suggestions, it's more likely to NOT fail.. p9 was a MAJOR development of its' own..
filtering is easy.. SetGenFilter and/or SetRange can be used, in various conditions.. secondary indexes on the necessary fields will help, too..
key-trapping can be done in different ways, depending on context.. and that will depend on your code and knowledge, too..
there is very little detailed help available here.. please go to the paradox community forum,
Home - Paradox Community, where most of the remaining developers hang out..