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!
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?
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 !
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...
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...