Using Dynamic Action, we can get the column value in item from interactive report.
Click below link to see demo-
https://apex.oracle.com/pls/apex/f?p=S_MYDEMO:GETID:&APP_SESSION.:::::
How it works?
First set Static ID in your report-

Then, go to the column of which you want to get the value in item and change it to link and set link attributes-

So here, I am trying to get the employee number.
That's it at report level, now move to dynamic action.
Create an Item, P2_ADD.
Create new DA, set to Click with jQuery selector-

Create True action >> Execute JavaScript code

Click below link to see demo-
https://apex.oracle.com/pls/apex/f?p=S_MYDEMO:GETID:&APP_SESSION.:::::
How it works?
First set Static ID in your report-
Then, go to the column of which you want to get the value in item and change it to link and set link attributes-
So here, I am trying to get the employee number.
That's it at report level, now move to dynamic action.
Create an Item, P2_ADD.
Create new DA, set to Click with jQuery selector-
Create True action >> Execute JavaScript code
Create True action >> Execute Server Side/plsql code
pass null in body.
Items to Submit --> :P_ITEM
$s('P34_MT_ID', $(this.triggeringElement).data('id'));
$(".my-report td[headers=my-id]").each(function(){
$(this).closest('tr').removeClass('u-warningcustom');
$(this).closest('tr').addClass('u-warningcustom1');
});
$(this.triggeringElement).closest('tr').removeClass('u-warningcustom1');
$(this.triggeringElement).closest('tr').addClass('u-warningcustom');
Inline CSS-
.u-warningcustom td {
background-color: #edfcef !important;
}
.u-warningcustom1 td {
background-color: white !important;
}
No comments:
Post a Comment