Reusing reference selectors.

0
I am being tasked with converting a python based data entry program into a mendix application. So far so good but I came across a problem. The python application uses a series of nested (or depent) drop downs in order to fill in data on a lower level drop down for example: [Line/fabrication area] controls the dropdowns for [Category] which controls the drop downs for [SubCategory]. There are 8 identical lines and 3 different fabrication areas, in the python program I simply had a script set in the background that allowed the lines to use the same [Category] and [SubCategory] when it read what was in the line in the name selection and change the [Category] and [SubCategory] when it read a fabrication entry. In mendix I have an entity {Line Name} (which I also use to hold the fabrication names as well) and it has a respective {Category} Entity (with a many to one association to line name) and {SubCategory} entity (with a many to one association to Category). All in reference selectors constrained to each other in order for the drop downs to be “nested” in a sense. The only issue is with the current set up I will have to create a new set of {Category} entries and {SubCategory} entries for each {Line Name} entry.   I can sort of side step this issue by using the excel importer module and make an excel sheet of all the needed entries but that might not be the most efficient action. Is there a good way to set up the entities or constraints so that I can have the 8 lines use the same Category and SubCategory entities while simultaneously allowing the same reference selectors to change when a fabrication area is selected? Domain model below:
asked
1 answers
0

In your model the category is associated to the lineName as *:1, this means that the category item can only be associated once to a lineName item. If you reverse the association to 1:* the category item can be associated to 1 category and the category to multple lineName items, thereby preventing the need for the duplication of the category items.

The way to create this configuration data is a little bit different as you will need to select the category on the lineName item.

In the page where you select the different options starting with the lineName, the other items can be constraint via the alternative path. So from the page object select the category with the restriction that follows the path to the lineName to the category. This can be done either via xpath, the constraints option of by setting up microflows for the refence selectors as datasource.

Hope this help in finding a solution in your case.

answered