【发布时间】:2015-05-11 10:16:34
【问题描述】:
我在 oracle apex 中有一组文本字段项:
- 订单号
- 修订号
当我们打开报告时,修订应该是隐藏的。
只有当用户输入唯一的订单号(非重复的订单号)时,修订号才应该可见。
如果他输入重复的订单号,修订号应该被隐藏。
我已经创建了这些动态操作,并且运行良好。
如果订单号重复,我需要提醒“这是重复值”吗?我在下面创建的动态操作中的何处包含警报消息?
顺便说一句,我的动态操作运行良好。我只需要为以下动态操作提供警报消息:
第 1 步。创建三个页面项
- P1_ORDER_NO - 文本字段
- P1_REVISION_NO - 文本字段
- P1_ENABLE_DISABLE_REVNO - 隐藏,值受保护 - 否
第 2 步。创建 3 个动态操作
1) 在页面加载时禁用修订号
Event - Page Load
Action - Disable
Fire When Event Result Is - True
Selection Type - Item
Item - P1_REVISION_NO
2) 检查重复的订单号
Event - Change
Selection Type - Item(s)
Item(s) - P1_ORDER_NO
Condition - is not null
Action - Execute PL/SQL Code
Generate opposite false action - Unchecked
Fire When Event Result Is - True
Fire on page load - Unchecked
Stop Execution On Error - Checked
Wait for Result - Checked
PL/SQL Code -
declare
l_count number;
begin
select count(*) into l_count
from emp
where empno = :P1_ORDER_NO;
if l_count > 0 then
:P1_ENABLE_DISABLE_REVNO := 1;
else
:P1_ENABLE_DISABLE_REVNO := 0;
end if;
end;
Page Items to Submit = P1_ORDER_NO
Page Items to Return = P1_ENABLE_DISABLE_REVNO
3) 启用和禁用修订号
Event - Change
Selection Type - Item(s)
Item(s) - P1_ENABLE_DISABLE_REVNO
condition - greater than or equal to
value - 1
Action - Disable
Fire on Page Load - Unchecked
Generate opposite false action - checked
Selection Type = Item(s)
Item(s) - P1_REVISION_NO
【问题讨论】:
标签: oracle-apex