Mittwoch, 3. Februar 2016

The next page using the wizard

Okay, lets create the form using the page wizard.

Of course, we use the Form wizard,

and especially the Tabular Form wizard to create a single region.
Our form is based on the view maintenance_db.plsql_profiler_runs_vw and we want to be able to update and delete records. We use the column runid as primary key, and keep the existing trigger to handle updates and deletes (No additional functionality inside the page). Also we decide, that it shall be only be possible to update the column RUN_COMMENT.

Please refer to the screenshot for the other seetings. And of course do not associate the page with the Navigation Menu.

And the result looks like:

Like the Profiler runs page. That is not exactly, what I wanted,but maybe I can add the Percent Graph column here and remove the other page. Please notice, that this page already has all the functionality, that we had to create manually in APEX 4.1.

On the other side we will loose the nice functionality connected to the interactive report.

Ever tried to delete a page?

Deleting pages in APEX 5 sucks. But finally I found at least one way to do it!

  • Switch to Utilities/Cross Page Utilities/Delete Multiple Pages
  • Mark the page you want to delete and press Delete Pages

That's it

I would appreciate any hints to do it faster.

Thanks David, I must have been blind!

The next page... 2.0

I added the next (empty) page PLSQL Profiler Run Details. The page will not show up in the Navigation Menu, but as a child of the page Profiler Runs (renamed) in the Breadcrumbs list.

On second thought, it might be better to use the page wizard this time!

Did I mention ...?

I really love the Quick Edit button, that opens the Page designer at the perfect spot for changes.

So, when I want to f.e. edit the graph Attribute, I simply:

  • klick on the Quicke Edit button
  • hover over the header of the Graph column until a blue square surronds it and klick on it
After that the Page Designer will open and the Graph column section of my Interactive Report is selected.

PLSQL Profiler Runs => Adding a Gauge 2.0

Based on what I described in

PLSQL Profiler Runs => Adding a Gauge

I changed the query of the interactive report region to

SELECT runid ,
  related_run ,
  run_owner ,
  run_date ,
  run_comment ,
  run_total_time ,
  ROUND((run_total_time * 100) / max_run_total_time, 0) AS graph
  (SELECT r.runid ,
    r.related_run ,
    r.run_owner ,
    TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,
    r.run_comment ,
    r.run_total_time ,
    (SELECT MAX(run_total_time) FROM plsql_profiler_runs_vw
    ) AS max_run_total_time
  FROM plsql_profiler_runs_vw r

Please notice, that we not have to create some fancy HTML code to display the percentage gauge,

With Apex 5 we only have to set the type of the Graph Attribute to Percent Graph and we are done.

The result looks impressive, doesn't it?

PLSQL Profiler Runs 2.0

By now our lonely page looks pretty much empty, so we will add some content by adding and Interactive Report region to the page (Simple drag it in the Content Body section).

For now it is red, showing that there is an error.

Don't worry, we have just not defined the query to feed the report yet. I use this slightly ajusted query from an old post to solve this issue.

SELECT r.runid ,
  r.related_run ,
  r.run_owner ,
  TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,
  r.run_comment ,
  r.run_total_time ,
FROM plsql_profiler_runs_vw r;

And the result looks imediatly like this:

Hmm, looks like I was a little sloppy on adjusting the Timestamp formats. After some adjustments in Shared Components/Edit Globalization Attributes/Globalization the outcome should be like this:

Ever wanted to change the name of a page and show it in the Navigation menu as well?

I started with a page HOME as in Apex 4.1, but then I decided that I wanted to use the nice Navigation menu on the left hand side, skip the HOME page and start with the PROFILER page instead.

First approach => Update the name and the Title attribute in the page designer from



Naaaa, thats not what I expected.

So in fact we have to change some settings in the applications Shared Components section to change the Navigation Menu and the Breadcrumbs.

So for the Navigation Menu:

  • open the Shared Components page
  • find the Navigation section
  • pick the Navigation Menu link
  • pick the Desktop Navigation Menu list
  • open the entry named Home
  • finally change the List Entry label on the Entry tab to whatever you want in this case to "Profiler"
For the Breadcrumb:
  • open the Shared Components page
  • find the Navigation section
  • pick the Breadcrumbs link
  • pick the Breadcrumb entry from the Breadcrumbs list
  • open the entry named Home
  • finally also change the Short Name to whatever you want in this case to "Profiler"