Copy a row of data in interactive report in oracle apex

295 Views Asked by At

I have an interactive report in oracle apex, which has details of a bug like bug number bug description developer reviewer tdd dtc mr etc

I have a copy button for each row with the following code

<button class="fa fa-copy copy-row" data-id="#BUG_TRACKER_ID#" id="#BUG_TRACKER_ID#"></button>

On clicking this copy button, I am able to retrieve the id. But I am unsure how to get the data of the entire row. The code I used to get the id is as below:

var rowId = $(this.triggeringElement).data("id");
console.log(rowId);

This id will give me the primary key. Now I want to get the data of the whole row and create a summary from it. Please help

1

There are 1 best solutions below

0
Koen Lostrie On

Here is an example of how to copy a row using a button on an interactive report. It is based on the emp sample table. EMPNO is the primary key for the EMP table.

The DISP_COL_CLASS column is used to show/hide button for certain records (values are "block" and "none"). Button is built using the button builder

Hidden Page item

Create hidden page item to hold the value of the selected record. In this case it is P182_ITEM

Button

<button style="display:#DISP_COL_CLASS#" type="button" data-empno="#EMPNO#" class="my-button-js t-Button t-Button--tiny t-Button--success t-Button--stretch">Copy</button>

Dynamic Action

enter image description here

Action to set Value

enter image description here

Action to copy row

enter image description here

Action to refresh report

enter image description here