Reputation: 349
I have a set of text Field items in oracle apex:
When we open the report, revision should be hidden.
Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
If he enters duplicate order number, revision number should be hidden.
I have created these dynamic actions and it is working fine.
If the order number is duplicate I need to put a alert saying "This is a Duplicate value"? Where do I include the alert message in the dynamic actions I have created below?
Incidentally, my dynamic actions are working fine. I just need to accommodate the alert message for the following dynamic action:
Step 1. Create three Page Items
Step 2. Create 3 Dynamic Actions
1) Disable revision number on page load
Event - Page Load
Action - Disable
Fire When Event Result Is - True
Selection Type - Item
Item - P1_REVISION_NO
2) Check duplicate order number
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) Enable and Disable Revision Number
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
Upvotes: 0
Views: 7078
Reputation: 132570
You can add a second action to the 3rd event:
Upvotes: 1