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 - http://www.odtug.com/online-education.

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 apex.oracle.com 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 support.oracle.com  
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.