Introduction to Instant Row Deletion in Report

Learning Objective

The Classic / Interactive report has the Column link option, So we can display the link as Delete Option and we can build a customized solution using this functionality of Classic/Interactive Report. Below is a use case for Report:

Use case for Instant Row Deletion in Report

Requirement:

Instant Row Deletion of report

Solution:

You could achieve this using Column Level Dynamic actions in Oracle APEX Classic report / Interactive report. Let us see the step by step process to achieve this.

Step1:

We have to create Classic Report by using the below query

Region1:

Sample Code:

select SID,
       STUDENT_NAME,       STUDENT_ROLL_NUMBER,       STUDENT_DOB,
       STUDENT_AGE,       GRADE,       RESULT,
       SCHEDULE_DATE,       INCHARGE,       sid REMOVE
  from STUDENT_MASTER

Step2: Create  a page item  & set the type as “Hidden”.

Step3: In the classic report, Select the column REMOVE and set the type as “Link”.

We need to add a link column to your report for the delete icon with the following attributes:

Link Target: URL
URL: javascript:void(null);
Link Text: <span class=”t-Icon fa fa-trash delete-note” aria-hidden=”true”></span>
Link Attributes: data-id=#REMOVE#

Step4: We need to create a dynamic actions as follows

Dynamic Action

  • On Event: Click
  • Selection Type :   jQuery Selector
  • jQuery Selector : .delete-note

We need to create four true actions as follows

Action 1 :

  • Action:    confirm

Action 2 :

  • Action: Set value

Set Type : Javascript expression

Sample Code:

$(this.triggeringElement).parent().data(‘id’)

Affected Elements: Selection Type

Item Name : P34_DELETE_ID 

Action 3 :

Action : Execute PLSQL Code

Sample Code:

delete from STUDENT_MASTER where sid = :P34_DELETE_ID;

Items to submit: P34_DELETE_ID

Action 4 :

Action : Refresh Classic/Interactive Report

Output:

Now UI of the Instant Row Deletion as follows:

Recent Posts

Start typing and press Enter to search