You should replace your enum attributes for category and subcategory with two new entities to define these values. The subcategory should have an association with its parent category, then both entities are linked by associations to your product entity.
You can then constrain the values shown in the subcategory reference selector based on the value selected in the category reference selector using the constrained by property.
Take a look at the documentation here: https://world.mendix.com/display/refguide6/Input%20reference%20set%20selector Read the part about constrained by.
I am also trying to achieve the same result. I am really disappointed that it is so difficult to achieve what is basic basic functionality.
I have two tables Type and SubType
Type contains: Building Vehicle
Sub Type contains Building - House Building - Office Building - School Vehicle - Car Vehicle - Bike
I want two drop down lists
One to select the Type and then the other to be filtered on the selection of the Type.
I have read this page https://world.mendix.com/display/refguide6/Input%20reference%20set%20selector and I cannot make head nor tail how to achieve the expected result.The reference selector set option described in the example appears to want to load a new page to make the selection
I tried to set the data to come from an On Change micro flow - I cannot see how to pass in the selected value of the Type drop down. I have tried to constrain the values of the second drop down but the XPath is not straightforward and becomes unintelligible very quickly (and just generates errors)
I've spent 2 days researching this and cannot find how to do this - it shouldn't be this hard.
Can someone point me to a clearly worked example please.