List constraint problem when creating a new row in the list
Dear Mendix Community, I am currently building a data system application for my company. It is about the company’s programs running and the launches that inherit from those programs. Every single program and launch has got their own data sheet and on the program data sheet all launches inheriting from that program shall be displayed. Now I am facing the problem that whenever a user would like to create a new program, the full list of all launches is displayed instead of no inheriting launches at all, because I fixed the sorting issue of my launchlist (containing all launches) by List constraints on the Program ID manually in mendix studio Pro. Do you have any tips for me to solve this problem in another way instad of list constraits? Because users will not be able and allowed to use Mendix Studio Pro to set up their launch list, they should be able to do it while using the application. Kind Regards, David
Not sure if I understand you correct.
With inherit from you mean, a launch related to a program. And a program can have several launches?
“ the program data sheet all launches inheriting from that program shall be displayed” you want to see the list of all launches related to that program?
If both assumptions are correct; then the following domain model should be in place
The page showing the details of the program should have a nested list, connected to the Launch entity OVER association Launch_Program.
Add a listview inside the dataview containing the Program object
In the properties of the listview; Data source → Entity (path) → Select
Top of the dialog you’ll find the program object of the dataview
Pick the association to the referenced entity launch
If this isn’t available then the following might not be correct
Listview is not nested INSIDE the dataview
Your domain model isn’t correct (see above example)
The New button should create a launch object using the association as path to the Program object, so that the created launch object is directly associated to the current Program object. And thus only launches can be create for a particular program