1
votes

I am relatively new to Oracle APEX tool and I am struggling to create one action column in an Interactive Report, column that will contain for every row in report a dropdown button group with Edit / Delete / View, similar to the dropdown button group of Bootstrap but I don't know how to create such a thing in Apex. Could someone explain the html syntax of this code? I tried using bootstrap inside the sql query to build the html code, just like below but if I add the bootstrap css file it messes up the whole page..

'<div class="btn-group">
  <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Action <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
    <li><a class="btn btn-default" style="color: red;" href="javascript: void(0);" onclick="javascript: apex.confirm (''Are you sure you want to delete '||tu."alias"||'?'',''DATA_EXEC'');"><i class="fa fa-trash-o" aria-hidden="true"></i> Delete</a></li>
    <li role="separator" class="divider"></li>
    <li><a href="#">Separated link</a></li>
  </ul>
</div>'
2

2 Answers

0
votes

Oracle APEX Interactive Report supports adding a Link Column for each row. This Link Column is used to display extra links, to do action on the current record. But, i am not sure if there is any way to integrate bootstrap kind of dropdown in this Link Column as it supports very limited HTML tags.

Navigation: Interactive Report Attributes -> Link Column

Following is a conventional method to edit/delete/view a row data in a new page:

You can set the following values in Page 1:

Interactive Report Attributes -> Link Column -> 
Link Column = Link to Custom Target
Target = Page in this Application
Page = <Page Number>
Item1 = <Row ID>
Value1 = <Current Record Column ID>

You can create a page 2 to edit/delete/view a particular row id (means record from a table), and pass the row id from page 1 to page 2 as input. Say your current Oracle Apex Application Builder page is 1 and the column which uniquely identifies a row is EMPNO. Following are sample values:

Link Column = Link to Custom Target
Target = Page in this Application
Page = 2
Item1 = P2_EMPNO
Value1 = #EMPNO#

In Page 2, you need to have Page process with following attributes:

Type=Automatic Row Fetch
Process Point=On Load - After Header
Table Name=<The table wher EMPNO is defined>
Primary Key Column=<EMPNO>
Primary Key Item=P2_EMPNO
0
votes

You can add an empty column and Select empty column and go to interactive report report attributes. Then add your HTML in Column Formatting -> HTML expression section.

enter image description here