Selecting associated sub-entities from a pull down list?

Mendix Community: I have an entity structure that contains a high level entity that is 1:m associated with multiple sub-entities. Each of those, in turn, can be 1:m associated with multiple sub-sub entities. For example, a company can have multiple departments and each department can have multiple employees. (Each employee is only in one department). I have figured out how to use a nested set of data views and data grids where a lower level data view listens to a higher level data grid so that selecting a department in the top level data grid shows the employees in that department in a lower level data grid. That is fine for things like adding new employees to a particular department, viewing all of the database attributes for a particular employee, etc. However, that is a lot of GUI "machinery" if I simply wanted to select a particular employee in a particular department and then, based on that selection, show (for example) the work calendar for that employee. It seems as if I should be able to create a two-level pull down selection where the first pull down contains all of the department names. Once a department is selected the next level pull down would show the employee names in that selected department. It seems as if this should be possible using a combination of (possibly constrained) reference selectors or maybe lazy reference selectors, but I have made no progress in doing this myself. Does anyone have tips, suggestions, or references that would help to understand how to create a two-level set of pull down selections in which the "list" of elements in the second pull down is constrained by the entity selected in the higher level pull down? Thanks for your consideration, John
1 answers


Check out the Multi Level Menu Widget in the appstore. It is intended for just the situation you describe. Be sure to download the latest updated widget from Github as referenced in this thread: Forum Posting

Hope that helps,