Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Merge data from multiple tables into one listbox?

Hi All,

I have a scenario where I have data from projects as well as from sub-projects.  Each project (whether primary or sub) has the same attributes.  The projects can go up to six generations deep (i.e., Parent, Child, Grandchild, Great-Grandchild, etc.).

I can link a parent to a child easily enough but what I want to do is to provide listboxes of the various attributes (what state are they in, who is the project owner, what areas are impacted by this project/sub-project, etc.) that contain all the attributes from all levels.  In other words, all the attributes for Project A and all its Sub-projects in a single listbox so that if the user selects a value, it filters for all the projects/sub-projects that have that attribute.

Using fruit as an example, the user selects "Apple" from the list.  Parent does not have Apple as one of its attributes but one of its Grandchildren does.  I want to see the Parent, Child, Grandchild and any Great's that may exist that are connected to the Grandchild which had that attribute.

Each generation comes in as a separate table and to keep each table unique, the Parent may have the formal name but in all the sub-tables, the formal name (i.e., Owner) is prefixed by the Level number.  Thus, the Parent table would have Owner as a field, the Child would have L1_Owner, a Grandchild L2_Owner, etc.  I want to have a single listbox which has the owners from all levels in a single spot.

I figure if I can tie that listbox to the parent level, I can use triggers to cascade that filter to all lower levels.  However, not sure if it is possible to aggregate those values together or not.

If there are better ways to go about doing what I'm thinking, I'd love to hear it.  Some experience with QV but novice enough to know that often someone knows a better way to do something than I initially envision.

Thank you.

2 Replies
swuehl
MVP
MVP

I would try to avoid using triggers for something like that.

Have you considered concatenating all common attribute data into a single fact table with common fields, having a field with just a Project ID and linking that Project ID to a table that handles your project hierarchy (e.g. using the Hierarchy load statements in the script)?

Not applicable
Author

Good suggestion.  That may be the path I need to head down.

Thanks.