Download Source Code
Providing an example form for creating hierarchical trees in Oracle Forms to control data Block records. The This form whenever the user selects any node in the tree menu then corresponding the record is displayed at right side. This form was having a data blocks, EMP and control, the control block is having a Tree Item and populating that Tre E on Pre-form trigger with the following code: Ftree.populate_tree (' CONTROL. Emp_tree '); Ftree.set_tree_property (' CONTROL. Emp_tree ', Ftree. Query_text, ' SELECT decode (level, 1, 1,-1), Level, Initcap (ename), ' Fxrun ', ' | | ' empno from scott_emp ' | | ' START with Mgr are NULL CONNECT by PRIOR empno = Mgr '); Whenever user select any node then the following code was written on when-tree-node-selected trigger to fetch th E record for the selected employee: go_block (' EMP '); Set_block_property (' EMP ', Default_where, ' empno= ' | | ftree.get_tree_node_property (' CONTROL. EmP_tree ',: SYSTEM. Trigger_node, Ftree. Node_value)); Execute_query; The Fxrun.ico icon and table scott_emp is used in this example and script of this table and icon file are available In source code.Like the US to get notifications for free source code in the future, thanks.
Create hierarchical Tree to Control Records in Oracle Forms