Will the tree initially appear as shown? If not, why not?

Exhibit:

You are coding a When-New-Form-Instance trigger to populate a hierarchical tree item called Emp_Tree that should initially appear as shown in the exhibit. Mr. Bill, the president of the company, is the only employee who does not have a manager.
In the trigger, you declare a variable called rg_emps that is of the RECORDGROUP data type. You will use this record group to populate the tree. You use the following code to create the record group:
rg_emps := Create_Group_Form_Query(‘rg_emps’, ‘select 1, level, last_name, NULL, to_char(employee_id) from employees connect by prior employee_id =manager_id is null’); You then programmatically populate the record group, and then populate the tree with the record group.
You run the form to test it.
Will the tree initially appear as shown? If not, why not?

Exhibit:

You are coding a When-New-Form-Instance trigger to populate a hierarchical tree item called Emp_Tree that should initially appear as shown in the exhibit. Mr. Bill, the president of the company, is the only employee who does not have a manager.
In the trigger, you declare a variable called rg_emps that is of the RECORDGROUP data type. You will use this record group to populate the tree. You use the following code to create the record group:
rg_emps := Create_Group_Form_Query(‘rg_emps’, ‘select 1, level, last_name, NULL, to_char(employee_id) from employees connect by prior employee_id =manager_id is null’); You then programmatically populate the record group, and then populate the tree with the record group.
You run the form to test it.
Will the tree initially appear as shown? If not, why not?

A.
Yes, the tree will appear as shown.

B.
No. The first element selected in the select statement should be 4 because you want four levels of the tree to be displayed.

C.
No. You should eliminate the last element selected in the select statement, because you do not want to display the employees ID.

D.
No. The “connect by” statement should be “connect by prior manager_id = employee_id”.



Leave a Reply 0

Your email address will not be published. Required fields are marked *