filtering data trees

User 9afd5de273

03-07-2012 13:39:39

I've been busy setting up a small project database in IJC. It contains one structure table and several other tables that contain assay data and some other relevant info. Using data trees I've succesfully made different trees that allow for browsing the data in the database in different ways by combining a number of these tables. All fine up to here.

However, I now seem to run into a difficulty. I would like to be able to build a datatree that browses only a subset of the rows present in the root entity. I guess this could be done by running a query in the relevant form view and then start browsing, but I would like to prevent this extra step every time I open a form view.

I also looked into using an SQL filter in IJC. This works, but unfortunately, the filter I apply in the datatree also become active in the table which was used a root entity for that datatree. And as I use some of my tables in multiple datatrees indepently this causes trouble in my other datatrees...

Any suggestions on how to solve this?

Many thanks in advance!

ChemAxon 60ee1f1328

03-07-2012 13:52:09


One option available to you, I think is to try :

You can create another object based upon your query and promote it to data tree?


User 9afd5de273

03-07-2012 14:48:50

Hi Daniel,

Clear. I would need to perform these operations directly on the database? Or is there a way to do this via IJC?

By the way: we are using a MySQL database at the moment. Does this allow these type of views to be created?

Many thanks,


ChemAxon 60ee1f1328

03-07-2012 14:58:01

Hi Sander,

I think the structure based views are more geared around Oracle and the cart index - there is no concept of domain index in mysql presently.

You could try and create a subset of a JCHEM table in mysql and promote it separately ?

However at that point it would be out of sync with its source data.

This could be remedy with a regular snapshot such as use views/materialized views (if they exist in mysql) and triggers or CREATE TABLE AS SELECT.

Too many choices !



User 9afd5de273

10-07-2012 12:29:37

Hi Daniel,

Using your hints I managed to solve my problem. Indeed, MySQL does not seem to support views of structure tables...

I managed to solve it by creating a view of the structure table that shows only a subset of the columns (excluding the structure fields, that works fine). This view I subsequenlty link to the original structure table via a relationship and then I use it as the root entity of a datatree. I then linked the structure table to the root entity as an edge, and voila: I can browse the view including the linked structures!

Poor man's work-a-round, but unitll now works like a charm...



ChemAxon 60ee1f1328

10-07-2012 12:53:39

Ah, well played by yourself then I would say...I will close this one but if anything crops up just write to this forum thread again and we can re-open it...