Mike Moody
Kilo Guru

The way I handled this in our CTI structure, is that I created custom tables for Category, Type, and Subtype respectively. Then I created reference type fields on the Record Producer and used advanced reference qualifiers that would pass in the currently selected value of the dependent field(s). This advanced reference qualifier would then query a many to many table that I created which linked together all the valid Category/Type/Subtype combinations. Finally I created two Catalog Client Scripts which were responsible for performing an AJAX call to a Script Include to check if a dependent field still had a valid value once it's field it was dependent on changed, if not it would clear the value in that field. That's just another way to consider handling this, it also has the added benefit of being able to scale your CTI structure by creating additional custom tables for another subcategory level and simply adding a new reference field to the many to many table.