It helps if you mentally separate stored data from displayed data. Stored data should ideally be stored only once to avoid duplications and coherence problems.
Think of your Modules as completely separate, and without repeated data between them. So the data in Module 1 is only in Module 1.
BUT now the Module 2 detail view SHOWS some data from Module 1. So it’s just an adjustment to the view.
The same goes for the report, it pulls data from a second, related, module.
You need a bit of custom code to achieve this… it’s simple, but it’s PHP, not something you can do from Studio, unless you make all the pulled data from the second module reside in a subpanel (which is the standard way of SuiteCRM showing related modules).
What is your Module1/Module2 relationship like? One-to-one? One-to-many? Many-to many?
Do you have any special reason for not doing this “the SuiteCRM way”, with the related module in a subpanel? That is actually what makes sense for a one-to-many relationship…
Of course, I prefer the standard SuiteCRM way to do it. Someone told me before that the only way to do it is with PHP so I reached out for help here…
So, I already created a relationship between modules. Do you mean I should create a subpanel in the primary module and link it to the secondary module? And the subpanel will retrive the loaded .csv data from the secondary to the primary module?
I can select some entry from the “many” module to the layout of the “one” module. That is okay. The problem is that it still doesn’t contain all the data entered to the “many” module when exporting from the “one” module.
Example: The “many” module layout contains fields Name, Description and Type.
The “one” module layout contains fields Amount, Year, Month.
In the subpanel the data from the “many” module was selected to the layout of the “one” module. I expect the Name, Description and Type to be inside the “one” module now.
Following this, my export should contain Name, Description, Amount, Year and Month now. And that is not the case. It doesn’t export any fields from the “many” module.
In Studio, you can edit the fields that appear in the subpanel to select the ones you want.
It’s not that the data is copied from one module to the other, it’s just that it is displayed in a structured way (respecting the one-to-many relationship).
I’m not talking about Exports at this moment - we can do that in the Reports Module, later. For now we’re just trying to get the data design right - data entry, screens to browse it, etc.