Oracle Application Express 5: Developing Web Applications — Question 46
Morgan has a report and form on the EMP table. He updated the form by adding a display-only item P5_LOC, and a change event dynamic action on P5_DEPTNO to populate the item using Set Value with this SQL: select loc from dept where deptno = :P5_DEPTNO;
When Morgan runs the page, he gets this error:
apex_error_code:
WWV_FLOW_DML.COLUMN_NOT_FOUND -
original message: Column LOC not found in table EMP
What should Morgan do to prevent this error?
Answer options
- A. Update P5_LOC and set Source Type to "Null".
- B. Update P5_LOC and set Source Database Column to DEPTNO.
- C. Update P5_LOC and set Source Type to Item and select Item P5_DEPTNO.
- D. Update P5_LOC and set Save Session State to "No."
- E. Update P5_DEPTNO and set Type to "Display Only."
Correct answer: A
Explanation
The correct answer is A because setting the Source Type of P5_LOC to 'Null' prevents it from expecting a value from the EMP table, thereby avoiding the error. Options B, C, D, and E do not address the root cause of the issue, which is that P5_LOC is not a valid column in the EMP table and thus would still lead to an error.