If like me you find programming the tree control to be a pain in the bum you may be interested in this little bit of code.
With it you can take a database table and create a tree hierarchy
So the table above will create a tree that looks like this when you use the query SELECT * FROM experimentTree
Going back the other way we want to generate SQL INSERT statements (this is SQLite flavour) or a table of data to parse back.
The code to generate this is included in the teststub. As a separate statement or as part of the main statement you should also empty the table.
The front panel of the teststub looks like this
To get a tree from the database the block diagram looks like this.
To plant a tree in your database, the block diagram looks like this.
For simplicity I have contrived the tags. For my purposes I will be linking the selection to an experiment, obviously your requirements may differ, in essence the experiment field will be a foreign key into another table.
It's in LabVIEW 2014, but I can down-version if required.
Perhaps this will help make tree-huggers of us all