Problems with data trees and displayed values

User 3a6148984a

09-06-2011 13:10:47

Hi,


I have a problem with data trees in Instant JChem. Using the example Structures->Samples->Activities, with the relationships defined as one-to-many, I will only get the activities of the first sample in a table form widget. What I would want are all activities for a given structure.


Basically 


SELECT a.* FROM Activities a JOIN Samples sl ON sl.sample_id = a.sample_id JOIN Structures s ON s.structure_id = sl.structure_id WHERE s.structure = [given structure_id]


Is there a solution for this?


Cheers,


Adrian

ChemAxon fa971619eb

09-06-2011 19:26:44

Hi Adrian,


essentially you will need a relational form for this.


For those 3 levels of heirarchy you will probably want:


1. Widgets (text field, structure etc.) for the parent (Structures) level fields


2. A table widget for fields from the Samples level.
This will display a row for each sample for the currently displayed structures. By default the first of these is selected.


3. A table widget for fields from the activitiies level.
This will display a row for each activity for the currently displayed sample. As the first sample is selected by default you will see the activities for that first sample.To see the activiites for the second sample you need to select it in the samples table. The rows displayed in this child level are those of the selected row in its parent.


There is no current way to display all the rows in the activities table in this type of form. Only those for the selected row in its parent.


Tim