Oracle APEX report refresh the easy way

I’ve seen numerous solutions for partial page refreshes. All using javascript, timers etc.

I just want a report to refresh itself after 5 seconds.

I add this to the region-footer:

<script type="text/javascript">
setInterval( "$a_report('##REGION_ID#'.substring(1), 1, 7, 7);", 5000);

On request of Patrick Wolf (in the remarks below) this also works:

<script type="text/javascript">
  setInterval("jQuery('##REGION_ID#').trigger('apexrefresh');", 5000);

No extra javascript functions, no dificult parameters, works for multiple regions..

Essentially it will do a region refresh using the $a_report apex-javascript function only once (after 5 seconds)..

But when the region gets refreshed…. this region-footer gets executed again…. hence: a refresh every 5 seconds.

$a_report takes these parameters:

  1. the region_id that needs to be refreshed. (apex puts an ‘R’ in front of it. the substring(1) removes the ‘R’ again)
  2. the 1st record to show
  3. the last record to show
  4. the number of records to show
  5. sorting

I hope this helps.

0 thoughts on “Oracle APEX report refresh the easy way

  • Hi Richard,

    I would suggest to not use undocumented and unsupported APEX Javascript APIs. It’s very likely that we will change them in the future.

    If you are on APEX 4.0 you can use


    to refresh a region or you just use the “Refresh” dynamic action in combination with the Timer dynamic action plug-in from


    • @Richard – thanks for the article and apologies for replying to such an old comment!

      @Patrick –
      I’m using Apex 4.2 and have searched through the javascript APIs. It seems that in this version, the way to invoke the above “trigger” method is to call the documented apex.event.trigger function. However, I can’t for the life of me find any hint in the documentation regarding the events themselves (the pEvent parameter to this function, I assume). Is there somewhere that ‘apexrefresh’ is officially described?

      Many thanks,

  • Frank Reijenga says:

    I tried to use the timer plugin.
    It works fine for periodically refresh reports (e.g. select to_char(sysdate,’HH24:MI:SS’) from dual), but I can’t get it working to refresh page items (or regions with page items).
    Any suggestions to get this item refresh working with the timer plugin are welcome.
    Thanks, Frank

  • Richard Martens says:


    Hmm.. I don’t see where I’m using a plugin. Maybe you can try Patrick’s suggestion below. Otherwise try to get infromation from the plugin developer.


  • Please, how to implement a timer(hh:mi:ss) in oracle apex. I review the documentation but donĀ“t understand, can you say me peer to peer how to do.


  • says:

    Thanks Richard,
    Worked great for me. I was doing whole page refresh, but region refresh is match better. You don’t have a blinking page!
    But instead of region number I placed div tag in header of the region and used it as a selector.
    setInterval(“jQuery(‘#my_dev’).trigger(‘apexrefresh’);”, 5000);


  • NOTE: This only worked for me in the following configuration:

    setInterval(“apex.jQuery(‘##REGION_STATIC_ID#’).trigger(‘apexrefresh’);”, 3000);

    Hope this helps someone else having the same trouble I did. (apex version

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>