List constraint problem when creating a new row in the list

0
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
asked
1 answers
1

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.

  1. Add a listview inside the dataview containing the Program object
  2. In the properties of the listview; Data source → Entity (path) → Select
  3. Top of the dialog you’ll find the program object of the dataview
  4. Pick the association to the referenced entity launch
    If this isn’t available then the following might not be correct
    1. Listview is not nested INSIDE the dataview
    2. Your domain model isn’t correct (see above example)
  5. Done

 

 

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

 

Edit: added datasource selection listview

answered