Thursday, June 17, 2010

There may be some instances when you have validations on your APEX page that you only want to run if all the other validations have passed. A good example of this is if you have 2 fields, FROM_DATE and TO_DATE and have the following validations:- V1: Ensure FROM_DATE is not null and is a valid date- V2: Ensure TO_DATE is not null and is a valid date- V3: Ensure FROM_DATE < TO_DATE

In this example you only want the last validation to run if the first 2 pass (i.e. both FROM_DATE and TO_DATE are valid dates). Currently there's no declarative way of doing this. i.e. validations don't support declarative dependencies.

A simple trick to get around this issue is to put a condition in some validations to only run if all the other validations pass. This may not work in all situations, however it should help you in some.

In the example about, modify the 3rd validation (V3) and set the condition to the following:Condition Type: PL/SQL ExpressionExpression 1: apex_application.g_inline_validation_error_cnt = 0

Wednesday, June 16, 2010

I was testing APEX 4.0 on http://apex.oracle.com and I noticed that on Standard Reports you can add 2 types of "special" columns: Derived Column and Column Link. At first I thought this was a new APEX 4.0 feature, but then tested on a copy of 3.x noticed it was there as well! I apologize if this is old news to people but I found it to be a pretty neat feature.

The interesting thing about these columns is that you can add Derived Column and Column Link columns and it does not modify your existing SQL.

The only difference I can tell about these 2 column types is that Derived Columns don't contain the following attributes: List of Values, Tabular Form Attributes, and Column Link

Tuesday, June 15, 2010

Sometimes you may have a column that contains inline HTML. A simple example of this is if you have a column called "color" and you want to display the color in the report. Your query would look like this:

SELECT '"' || color || '' colorFROM my_colors

Note: That they're ways to get around this simple example using Report Templates and Column Formatting. I'm just using it for demo purposes

If you were to download this report the "color" column would contain all the html (i.e. span tags etc). This may confuse users since they expected to see "red, green, blue, etc..." in their download file, but instead see the colors wrapped in a lot of html.

A workaround that I've used is to create 2 columns: color_html and color

Monday, June 14, 2010

I ran into an issue last week where I had an Interactive Report (IR) with over 100 columns. All 100 plus columns displayed for end users, however I was only able to modify the first 100 columns. For example, the 101st column did not display in the report attributes screen (see screen shot below)

After some digging around I figured out how to modify columns that weren't displayed on the Report Attributes screen. This demo requires Firefox and Firebug. You should also be able to do this in Google Chrome. This demo works for APEX 3.x and APEX 4.0.Build Large IR:

Just because I haven't had time to write about APEX, doesn't mean I've forgotten about this blog. I've been compiling a fairly large list of new things to write about over the past few months. I hope to spend a some time soon to write about these items.

Last, but not least, I'll be giving 2 presentations at ODTUG Kaleidoscope. I submitted my presentation for the CD, however I think that they'll change significantly by the time I present. As such I will post the final slides used for my presentation here after the conference. The presentations I'll be giving are

Enhancing APEX Security: Monday 2:30~3:30

How to be Creative: Using the APEX Dictionary to Create Solutions: Tuesday 4:45~5:45