Oracle Apex - Delete from Collection

 In oracle Apex when you want to delete from a collection :

Item Name : P101_DELETE_ID

In Link add the code :

javascript:getID(&SEQ_ID.)

Link Text :

<span class="fa fa-trash-o"></span>

Add the function at "Function and Global Variables" -

function getID(val)
{
apex.item("P101_DELETE_ID").setValue(val)
}

At Dynamic Action :

BEGIN
    IF :P101_DELETE_ID IS NOT NULL THEN
        APEX_COLLECTION.DELETE_MEMBER (P_COLLECTION_NAME   => 'WEMP',
                                       P_SEQ               => :P101_DELETE_ID);
    END IF;   
EXCEPTION 
  WHEN OTHERS THEN
     NULL;
END;

Add another True Action :

Refresh Region.






Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post