Dynamic Field Filter

I’m building an automotive parts store.

Each product suits a particular make, model and year of vehicle.

I have setup make, model and year as custom doctypes and added them as custom link fields to the Item doctype. I’ve gone into Product Settings and ticked “Enable Field Filters” and added them to the table.

The problem I have is that I need the filters to load dynamically, based on the value of the previous field. So the customer would first select a product category, then the make filter would be populated, then they select a make and based on that selection the model filter is populated.

Am I even going about this the right way? Should I be making custom doctypes for “make”, “model”, “year” etc? Can I do something with Dynamic Links, or is that only for Doctypes?

Am I better off storing the values for “make”, “model”, “year” etc directly in the Item table, or is that awful for database normalization? I think I know the answer, the database aught to have at minimum a a table for each, even that wouldn’t be a high level of normalization. I just don’t know much about normalization for web apps, because I get nervous that the joins are going to slow down the results for the user.

1 Like