Use a tree with a bridge-table relationship
Use a tree with a bridge-table relationship
Technologies > User Interface Add-Ins > Tree Views > Tree with Bridge Table - Emp. by Room by Div.
This tree displays employees by rooms by department by division. Because the employees table does not share a foreign key relationship with the division or department tables, a bridge table, the rooms table, is used.
<dataSource id="dv-ds"><table name="dv" role="main"/><field table="dv" name="dv_id"/><restriction type="sql" sql="count_em > 0"/></dataSource><dataSource id="dp-ds"><table name="dp" role="main"/><field table="dp" name="dp_id"/><restriction type="sql" sql="count_em > 0"/></dataSource><!-- Bridge table --><dataSource id="rm-ds"><table name="rm" role="main"/>
<field table="rm" name="bl_id"/>
<field table="rm" name="fl_id"/>
<field table="rm" name="rm_id"/>
<restriction type="sql" sql="count_em > 0"/>
</dataSource>
<dataSource id="em-ds">
<table name="em" role="main"/>
<field table="em" name="em_id"/>
</dataSource>
Note that in this four-level tree, all lower panel levels are nested within the top-most panel level:
<panel type="tree" id="division_tree" dataSource="dv-ds" ... >
<panel type="tree" id="department_tree" dataSource="dp-ds"/>
<panel type="tree" id="rooms_tree" dataSource="rm-ds"/>
<panel type="tree" id="employees_tree" dataSource="em-ds"/>
...
</panel>
View: http://localhost:8080/archibus/schema/ab-products/solutions/parts/tree/ab-ex-bridged-tree-emxrmxdv.axvw