Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








  Oracle Database Tips by Donald Burleson


The HTMLDB_APPLICATION package exposes several global variables used internally by the APEX engine.

  • g_user:  This is the ID of the currently logged in user.

  • g_flow_id:  This is the ID of the currently running application.

  •  g_flow_step_id:  This is the page ID for the currently running application page.

  • g_flow_owner:  This is the parsing schema for the current application.

  • g_request:  This is the most recent REQUEST.  Requests are set by buttons in APEX.

The HTMLDB_APPLICATION package also exposes a global array which references values from certain page items.  The HTMLDB_ITEM package can be used to create items on an application page.  This means the developer creates them programmatically during page rendering instead of creating the page item with a wizard.  When items are created like this, they are provided a numeric value.  APEX then references the page item in an array.  Up to 50 items can be created using the HTMLDB_ITEM package and still be allowed to reference them using HTMLDB_APPLICATION package.  An example of this was provided during the checkbox explanation in an earlier chapter of this book.  There, the htmldb_item.checkbox procedure was used to add checkboxes to a report.  The arrays in the htmldb_application package were then used to reference the checkbox during page processing.

For the checkboxes shown in Figure 10.3, the HTML code that was rendered by using the htmldb_item.checkbox procedure looks like the following:

<input type="checkbox" name="f10" value="1" CHECKED />
<input type="checkbox" name="f10" value="2" CHECKED />
<input type="checkbox" name="f10" value="3" />
<input type="checkbox" name="f10" value="4" CHECKED />
<input type="checkbox" name="f10" value="5" />

When the page is submitted, only the checkboxes which are checked will appear in the arrays of the htmldb_application package.  For the example above, there will be three array elements in the array named g_f10.  Programmatically, it is possible to loop through the array in a page processing process and update the data in the database.  The following code shows an example of how the code to loop through the htmldb_application.g_f10 array would look:

  for i in 1..htmldb_application.g_f10.count loop
    update class
    set    available_flag = 'Y'
    where  class_id = htmldb_application.g_f10(i);
  end loop;

While looping through the array and using the sample checkboxes from above, the values one, two, and four would appear in the array.

The above book excerpt is from:

Easy HTML-DB Oracle Application Express

Create Dynamic Web Pages with OAE

ISBN 0-9761573-1-4   

Michael Cunningham & Kent Crotty

Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.