Sunday 27 December 2015

Oracle APEX 5.0.3 patch released

Oracle Application Express Release

New APEX patch available for download

APEX 5.0.3 is now available for download.  

If you already have Application Express 5.0.x installed, you can download patch #22298106 from MOS.

More information on Oracle APEX

Happy upgrading,

p.s. All the best in 2016!!!!!!!!

Wednesday 2 December 2015

ODTUG APEX Webinar summary

APEX 5 - Printing options


This is a blog post that follows my recent ODTUG webinar. 

Here you can find presentation used during a webinar. 

And here is a summary table:

Thanks to everyone who joined me for this session. 

Video from ODTUG webinar can be found here: ODTUG/past-webinars


Tuesday 24 November 2015


APEX 5 - Printing options

Wednesday, December 2, 2015 12:00 PM - 1:00 PM EST

Excited to be able to invite you to my first APEX ODTUG webinar happening on 2nd of December 12:00 pm EST (3rd of December, 6 am NZ time). 

More information about the event and direct registration link can be found on -

Idea is to do a brief overview of the currently available printing solutions and how well/easy they integrate with APEX version. Hopefully there will be something for everyone. 

Look forward to the next week and thanks for joining me.


Wednesday 18 November 2015

Patching APEX 5.0.0 to 5.0.2

Oracle Technology Network Developer Day

How to setup and upgrade your Oracle APEX VM

There are many reasons why you would want to download one of these. Most of us need a separate DEV environment to do our experiments on. 

Sometimes you just do not have access to your companies DEV environments or are not allowed to run things there. 

On the other side limited access to can also be a reason. I found them very useful for running training's or doing various testings. 

Process to download it is quite simple and it shouldn't take long for you to be up and running. 

Reason why I decided to write a post about it is because by default VM comes with APEX 5.0.0 version installed while very recently Oracle announced patch 5.0.2 so I thought everyone would love to be on latest version. :))


Once your download is completed you need a tool to run this VM, I am using VirtualBox here.

1. Start your virtual box and import .ova file from your download location. 
2. Open your browser and open http://localhost:8080/ords/

If all is okay you should see your APEX login page. 

By default your INTERNAL workspace password has not been set and you will not be able to login into your APEX environment. 

So first thing we need to do is to configure this password.

3. Download APEX Installation files from Apex installation
4. Unzip them under Desktop/Apex
5. To change INTERNAL workspace password run apxchpwd.sql script from sqlplus:
   - open terminal window
   - position your self in /home/oracle/Desktop/Apex
   - start sqlplus
        sqlplus "sys as sysdba"   
     enter password
     @apxchpwd.sql (to run the script)
     type in your new apex internal password
   - exit sqlplus 

Now you can login into your APEX Internal workspace using your username and password:

Now you can create workspaces and administer your own APEX instance. If this is all you needed you could stop here and default APEX 5.0.0 version should be ready for you.

To upgrade to 5.0.1 or 5.0.2 patch process is the same as below:

1. After you have APEX Internal password all setup
2. open  
3. download patch #21805060 (this is 5.0.2 patch)
4. extract it to Desktop/Apex/patch
5. open the directory-> cd /home/oracle/Desktop/Apex/patch
6. start sqlplus with:
        sqlplus "sys as sysdba"   
     enter password (all default oracle passwords are oracle)
     @apxpatch.sql (to run the script)

After 7-10 minutes your patch should be installed!
7. As a last step we need to copy our new images into current APEX images directory.
cp -Rf /home/oracle/Desktop/Apex/patch/images/* /home/oracle/apex/images
Note here that official way to do this is by running: 
    @apxldimg.sql /home/oracle/Desktop/Apex/patch

but simple copy seems to be doing a good job.

If you do not complete the last step you might get a warning that you are using old APEX image file version but you should still be able to login into the new environment. 

Once this is done, reopen your APEX link and you should be running APEX 5.0.2 version.

Hope this helps.


Monday 9 November 2015

APEX meetup in Auckland NZ!

18th of November 2015!

ORCLAPEX-NZ next event

Please join us! for our next Oracle APEX meetup in Auckland, NZ. 

Learn about what is new in APEX 5.

Please RSVP and I hope to see you there.



Sunday 1 November 2015

Let APEX do the work for you

Replace ORACLE APEX substitution strings at once

apex_application.do_substitutions function

Just by accident I recently bumped into this function on Martin's blog from 2009.

Since I was in a need for something like this I thought how come people do not talk about this function more often as it can come very handy. So thanks Martin! :)

We were working on an application where users would store their links in database. Initially I was instinctively going with PL/SQL replace function (or regular expression way) but since recursive-ness became messy I was wondering if there is APEX build in function that could help me with this.    

As I had problems finding anything I decided to blog about it. This is a whole point of writing blogs so people can easily find things like this to save them time and give them access to these nice little features of APEX.

For demo purpose imagine something like this to be within your table column:
This is &APP_ID. with alias &APP_ALIAS. and &APP_SESSION.
Now if you wanted to build a simple report region (or use this data in your APEX page) most people would jump to using a REPLACE() function to get

But wait you can simply use apex_application.do_substitutions() that will do this for you. :)

Then in my demo example simply use 
select  apex_application.do_substitutions ('This is &APP_ID. with alias &APP_ALIAS. and &APP_SESSION.') content_with_subs FROM dual
and that is it. 

Of course a demo example is just a dummy but any of standard APEX links would be handled as well i.e. - 'f?p=&APP_ID.:DEMO:&SESSION_ID.::::::'

Or if you have some application defined substitution strings for your local images folder and JS files that are stored as part of column data.

Let APEX handle replacement of all these variables for you and no replace functions are needed.

Only note is that this function will only render the correct values once it runs withing your APEX page.


Friday 23 October 2015

Blog posts (blogspot) in Oracle APEX

How to get your latest blog posts in your APEX applications?

Quick ref guide

Very recently I have posted my notes on how to get your Twitter tweets in you APEX applications and this post is very similar with initial request.

We were doing some changes on our public websites and decided it would be cool to be able to automatically retrieve latest posts from our team blogs. After an initial research this is the easiest way to do this. 

Step 0. Download google API JS or simply reference it on your page

Step 1. create a simple static content region with a static ID of your choice. 
In my example this is region with ID set to Blog_region.

Step 2. Add this to your HTML page header
<script type="text/javascript" src="#WORKSPACE_IMAGES#google_jspi.js"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

    function initialize() {
      var resultLimit = 5;
      var blogURL = ''+ resultLimit;
      var feed = new google.feeds.Feed(blogURL);
      feed.setNumEntries(resultLimit); //this restics how many rows to return
      feed.load(function(result) {
        if (!result.error) {
          var HTML_content = '<div class="row">  <div id="leftcol">';
          for (var i = 0; i < result.feed.entries.length; i++) {
          var entry = result.feed.entries[i];
          var publishedDate =   entry.publishedDate;
          var title = entry.title;
          if(title.length == 0){
              var field = entry.content;
              var title = field.substr(115, field.indexOf("</span></h2><h3 ")-115);
                entry.content = entry.content.replace(title, "");
          HTML_content += '<article class="post"><div><h3 class="post_title"><a href="'
                     + '" target="_blank">'
                     + title
                     +'</a></h3> <div><i class="fa-time"></i> '
                     + entry.publishedDate
                     +' </div></div><div>'
                     + entry.content
                     + '<br><a href="'
                     + '" target="_blank" class="btn btn-primary">Read More</a> </div> </article> ';

          }//end loop

          HTML_content += '</div> </div>';

         //add this feed html code to APEX REGION
Together with this CSS: .post_title .btn {
    margin-top: 30px;
.btn-primary {
    background-color: #428bca;
    border-color: #357ebd;
    color: #ffffff;
.btn {
    -moz-user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857;
    margin-bottom: 0;
    padding: 6px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
a {
    color: #428bca;
    text-decoration: none;

Please check it out in live demo - Blog in APEX


Except few parameters that you can reconfigure and make dynamic this is all. One note is that sometimes depending on your blog template title field can be returned as empty hence the title.length hack.

Happy to share.