Monday, December 13, 2010

Column Groups in APEX 4.0 Interactive Reports

A long time ago I wrote about adding Column Groups to Interactive Reports (IR) in APEX: I created a new dynamic action plugin to do column grouping in APEX which can be downloaded here. Please read the help text in the plugin for full instructions on how to use it. Once integrated it should look like:

I also added additional JS debugging information. If you run your application in debug mode and look at the console you'll notice the following log information:

The additional logging is using the console logger wrapper that wrote: If you're writing your own plugins I suggest using it to instrument your code. It helped me debug some of my JavaScript issues while developing this plugin.

Wednesday, December 8, 2010


Over a year ago I wrote about how to permanently store some of the log information from APEX: APEX 4.0 has some additional columns in APEX_WORKSPACE_ACTIVITY_LOG which you may want to store as well. The following query identifies the new columns:

Note: This query assumes you still have an old instance of APEX 3.2 and a new instance of APEX 4.0 on your database
SELECT column_name
FROM all_tab_columns
WHERE owner = 'APEX_040000'
SELECT column_name
FROM all_tab_columns
WHERE owner = 'APEX_030200'
ORDER BY column_name
In case you don't have an old 3.2 instance on your database the new columns are:


If you permanently store the log information you may want to update your tables and scripts to store the new information.

Tuesday, December 7, 2010

APEX: How to Trigger Dynamic Action From Button

Someone recently asked me how to trigger a dynamic action from a button. At first I thought this was trivial question until I tried to do it and found it's not as straight forward as I expected.

The following steps cover how to create a dynamic action on a button:

Modify Button Template:

You'll need to modify the button template to allow for the button attributes to be applied to the button. This will allow us to use an ID to identify a button. To apply the button attributes go to Shared Components > Templates > Select the default button template (for most instances called "Button"). Add #BUTTON_ATTRIBUTES# to the button tag in the Template section. For example from:

<button value="#LABEL#" onclick="#LINK#" class="button-gray" type="button">


<button value="#LABEL#" onclick="#LINK#" class="button-gray" type="button" #BUTTON_ATTRIBUTES#>

Create Button
On the page you're working on create a Region Button:

Button Name: TEST BUTTON
Label: Test Button
Button Style: Template Based Button
Button Template: Button (or what ever button template you modified)
Button Attributes: id="test_button"
Make sure the id is unique

Action: Redirect to URL
URL Target: javascript:return;

Create Dynamic Action
Create a Dynamic Action. When you get to the "When" section:

Event: Click
Selection Type: DOM Object
DOM Object: test_button
The DOM object represents the ID that you defined while creating the button.
Condition: No Condition

Create your True and/or False actions accordingly.

Now when you run the page and click the button it should execute your dynamic action.