Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Including Alert message for my Dynamic Actions

Gayathri VenugopalMay 11 2015 — edited May 11 2015

I have a set of text Field items in oracle apex:

Order Number

Revision Number

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.

But my question is, 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 .

PS-my dynamic actions are working fine.just need help for accommodating alert message for the following dynamic action:

Step 1. Create three Page Items

    1) P1_ORDER_NO - Text Field

    2) P1_REVISION_NO - Text Field

    3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2015
Added on May 11 2015
1 comment
1,087 views