Column Not Found Error - Oracle Application Express 18 | Troubleshooting Guide

How to Prevent "Column Not Found" Error in Oracle Application Express 18

Question

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?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

A.

The error message "Column LOC not found in table EMP" indicates that the dynamic action is trying to update a column that does not exist in the table that the form is based on. In this case, the form is based on the EMP table, but the dynamic action is referencing the LOC column in the DEPT table.

To prevent this error, Morgan needs to update the dynamic action to reference the correct table and column. One way to do this is to update P5_LOC and set its Source Type to "Item" and select Item P5_DEPTNO as the source. This means that the value of P5_LOC will be populated based on the value of P5_DEPTNO.

To do this, Morgan can follow these steps:

  1. Edit the page that contains the form and dynamic action.
  2. Select the P5_LOC item in the tree on the left-hand side of the page.
  3. In the Property Editor, scroll down to the Source section.
  4. Change the Source Type to "Item".
  5. Select "P5_DEPTNO" as the Item in the Source section.
  6. Save the changes to the page and run it again.

By updating the source of P5_LOC to reference P5_DEPTNO, Morgan ensures that the value of P5_LOC will be populated based on the value of P5_DEPTNO, without referencing any columns that do not exist in the EMP table. This should prevent the error from occurring.