I have a custom entity which represents a laboratory sample. This entity contains a custom multi-value field (analysis) with CARDINATITY_UNLIMITED for all the analyses that are performed on this sample. This works great for most analyses, for example, I can record the information on a sample (lot number, date sample was taken, etc) and measure its ph, and record the method ('ph') the date of analysis, and the result. I can also measure the temperature of this sample and record the method ('temp'), the date, and result.
However, some analysis methods return multiple results. A GC can return the concentrations of hundreds of compounds in one run. To represent this, I created a new entity called multi_analysis. This entity stores the method, the date, and a custom field. I also have an entity_reference to the sample that was analyzed. The custom field is CARDINATITY_UNLIMITED and lists the chemical name and the concentration for a specific multi_analysis.
I feel that, first off, I probably should move the entity reference to the sample entity with CARDINATITY_UNLIMITED, to make Widgeting simpler, despite the fact that this will create a new table.
If I did this, instead of using a entity_autocomple widget to find an existing multi_analysis entity in the sample addition form, is there a way to create a new multi_analysis entity within the sample entity admin page?
Alternatively, can I somehow make this multi-analysis a field and do the sample thing? Is it possible to have a field, which itself contains another field with CARDINATITY_UNLIMITED?