Forum Stats

  • 3,782,041 Users
  • 2,254,585 Discussions
  • 7,879,899 Comments

Discussions

Use value from tabular form column in the LOV definition of another column

Uncle Buck
Uncle Buck Member Posts: 138 Blue Ribbon
edited Jul 14, 2016 2:07AM in APEX Discussions

APEX 5.

I have an existing page I am trying to modify. The IR region is a select of a few columns from a table.

select 
TOOTH_ID,
TOOTH_NUMBER,
MATERIAL_TYPE,
CONNECTION_TYPE
from table_a
WHERE restoration_id IN 
(SELECT restoration_id
FROM restorations
WHERE workorder_id = :P1_WORKORDER_ID)

For connection_type, in the Report Attributes section, this is populated using an LOV.  In the List of values definition, the code is:

SELECT v1.connection_type_desc display_value,
       v1.connection_type_name
FROM   connection_v v1, XML_V xml
 WHERE v1.workorder_id = :P1_WORKORDER_ID
   and xml.toothnumber(+) = :TOOTH_NUMBER
   and xml.workorder_id(+) = v1.workorder_id
   and xml.connection(+) = v1.connection_type_name

My change was to add the join to the xml table, but it is failing because I think the :TOOTH_NUMBER value is NULL and cannot be referenced.

So how do I reference that value from within the same tabular form?  I don't want to change the form; I just need to change the LOV for one of the columns.

I found an old archived similar thread, but there was no answer.

Thank you.

Tagged:

Answers

This discussion has been closed.