带有“函数体返回 PL/SQL”的交互式网格列给出引用列的错误错误?

问题描述

假设我有一个包含 2 列(A 和 B)的表格。其中一列 (A) 将定义另一列 (B) 的 lov

我有一个 IG,B 列设置为“Popup lov”,值列表为“函数体返回 PL/sql”。我已经把这个演示查询

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;

因此,当 A = 1 列时,B 列的 lov 将与 A = 2 时的 lov 不同。

这在插入新行时有效。但是当网格第一次加载时,它不会恢复任何值的“显示值”。所以用户总是在网格中看到 lov 的“返回值”。调试显示错误:“ERR-1002 无法在应用程序“131181”中找到项目“A”的项目 ID”。

(view error on debug messages)

列“A”设置为列 B 中的“父项”和“要提交的项目”属性required 设置为 false。

这似乎是一个错误。有人遇到过这种情况吗?我能做什么?

谢谢!

解决方法

在 LOV 的级联 LOV 父列属性中添加列 A。 或尝试使用源作为 SQL 查询

select state_name d,st r from demo_states where :A = '1'; 联合所有 select product_name d,product_id r from demo_product_info where :A = '2'; 联合所有 select null d,null r from dual where :A = '3';