Oracle Application Express 5: Developing Web Applications — Question 25

Kyle is developing a page with an interactive report, called Employees, using this query:
SELECT EMPNO, ENAME, JOB, DEPTNO FROM EMP WHERE DEPTNO = nvl(:P3_DEPTNO, DEPTNO)
On the page, Kyle adds a select list, called P3_DEPTNO, using this query:
SELECT dname, deptno FROM dept;
He creates a dynamic action on change of P3_DEPTNO, with a true action of "Refresh" against the Employees region.
Kyle then runs the page and selects ACCOUNTING in the P3_DEPTNO item. However, the report still shows employees from all departments.
What must Kyle do to correctly display only employees from the department selected?

Answer options

Correct answer: B

Explanation

The correct answer is B, as adding a true action of Set Value with Static Assignment ensures that the selected department number is properly set before the report is refreshed. The other options do not directly address the need for the selected value to be applied to the report's query, which is necessary for filtering the results correctly.