Master Form

1
If I want to select one entity to data view and one entity to data grid in the master form is it possible to do so in Mendix and if yes then how can I do so? Thank You,
asked
4 answers
2

The question is a bit vague, but probably you should take a look at this (if I understand the question correctly):

https://world.mendix.com/display/howto25/Set+up+a+listen+target+for+a+data+view

answered
2

You're having 2 issues here.

For errors 2 and 3 look at the form that is being opened from the new and Edit buttons, I think you'll find that the entity of the data view in the form is not the same as the entity for the grid.

From your description the grid is attached to the Inspection and the form that is being opened is attached to the entity tree.

The other issue has to do with the listening data view. A data view listening to a grid should be of the same entity. For example the grid shows customer names in a list. The data view shows fields of the entity customer, e.g. the name and some other info, then a listening view will work.

You might be able to achieve what you want by setting up the model as follows:

The tree object is connected to the Inspection object with the 1 side of the relation in hierarchal view of the domain on the inspection side.

Create a view with 1 grid of Inspection and a data view of inspection and inside this data view add another data view of the tree via the relation between the tree and the inspection. So there is a nested data view on the form.

Now make sure the other data view is listening to the grid and then the related data of the tree will show up in the data view.

Of course the relation between the inspection and tree entity needs to be created in the data as well and the fix for the errors 2 & 3 still need to be applied.

I hope this helps

answered
0

In the master details form I made a data grid and a data view and then I tried to connect two different entities such as one entity called Tree for data view and other entity called Inspection for data grid and I changed the Listen target to grid1 form the properties but it doesn't work and it shows errors.

The errors are:

  1. MyFirstModule Form 'MasterForm' Data view 'dataView1' Data view entity 'MyFirstModule.Tree' is not the same as or a superentity of entity 'MyFirstModule.Inspection' of listen target 'grid1'.

  2. MyFirstModule Form 'MasterForm' New button of data grid 'grid1' Entity 'MyFirstModule.Tree' of the pop-up data view does not match entity 'MyFirstModule.Inspection' of the 'New' button.

  3. MyFirstModule Form 'MasterForm' Edit button of data grid 'grid1' Form 'MyFirstModule.Masterform_NewEdit' does not contain a data view to edit objects of type 'MyFirstModule.Inspection'.

answered
0

Thank you very much..yes I know about error 2&3 but I was confused about 1st..I will follow the above steps and hope it may solve the problem. Thank you once again for help.

answered