Velocity
Velocity

Reputation: 479

Unable to delete row in interactive report using ORACLE APEX

I am unable to delete any row in my interactive report. Steps: Create new interactive report page.

Create page item P400_EMPLOYEE_ID referring to PK employee_id and set to hidden.

For the virtual column 'del', properties are: Type: link URL: javascript:void(null); Link Text: Link Attributes: data-id=#EMPLOYEE_ID#

Create Dynamic Action option: Name: DA_DELETEROW Event: Click Selection Type: jQuery Selector jQuery Selector: .delete-irrow Event Scope: Dynamic

right-click on the Dynamic Action DA_DELETEROW and select Create True Action : Action: Confirm Text: Are you sure to delete this employee?

2nd true action: Action: Set Value Set Type: JavaScript Expression JavaScript Expression: $(this.triggeringElement).parent().data('id') Selection Type: Item(s) Item(s): P400_EMPLOYEE_ID 3rd true action: Action: Execute PL/SQL Code PL/SQL Code: Delete from employee_leave where employee_id= :P400_EMPLOYEE_ID; Items to Submit: P400_EMPLOYEE_ID

Last true action set as refresh the region.

Despite this, i can see the delete button but unable to delete any row. It just refreshes the page on delete and no row is deleted from report or table.

Please help!!!!!!

Upvotes: 0

Views: 2449

Answers (1)

Joel R. Kallman
Joel R. Kallman

Reputation: 621

Why are you trying to remove a row from the Interactive Grid using dynamic actions? Wouldn't it be simpler to delete the row from the database and refresh the Interactive Report?

Upvotes: 0

Related Questions