Interactive Grid column with "Function body returning PL/SQL" gives errors referencing columns (bug?)

999 views Asked by At

Lets suppose I have a table with 2 columns (A and B). One of these columns (A) will define the LOV of the other (B).

I have an IG with column B set to "Popup LOV" and the list of values being "Function body returning PL/SQL". I have put this demo query:

begin
  if :A = '1' then
    return 'select state_name d, st r from demo_states';
  elsif :A = '2' then
    return 'select product_name d, product_id r from demo_product_info';
  else 
    return 'select null d, null r from dual';
  end if;
end;

So, when the column A = 1, the LOV of column B will be different of the LOV when A = 2.

This works when inserting a new row. But when the grid loads for the first time, it does not recover the "display value" of any value. So the user always see in the grid the "return value" of the LOV. Debug shows this error: "ERR-1002 Unable to find item ID for item "A" in application "131181"".

(view error on debug messages)

Column "A" is set as a "Parent" and "Items to submit" properties in column B. Required is set to false.

It seems this is a bug. Anyone have encountered this? What can I do?

Thanks!

1

There are 1 answers

1
awais majeed On

Add Column A in cascading LOV Parent Column property in LOV. or try to use source as SQL query

select state_name d, st r from demo_states where :A = '1'; union all select product_name d, product_id r from demo_product_info where :A = '2'; union all select null d, null r from dual where :A = '3';