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

 
 Home
 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
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

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

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle Application Express Apex APEX: Formatting & validating numeric & currency screen items

Oracle Tips by Burleson Consulting

There are a wide variety of choices for formatting currency items in APEX.  Some of the choices you must make for formatting APEX screen items for currency values include:

- Dollar Sign - You can display the item with the dollar-sign, but your end-user may strip it off when entering data, and you would need to write transformation rules to ensure consistency.

- Enforcing numeric format - You must validate that your currency item is in your desired form, with the dollar sign and decimal point in the right places.

You can get as fancy as you want, but here is a quick-and-dirty way to enforce a currency values using standard APEX item validations with regular expressions.  In my example, I needed a currency screen value with a maximum value of 99 dollars and 99 cents.  (Note: APEX does not have a numeric datatype for screen items, and all screen items start as text fields.)

I chose to omit the display of the dollar sign to make it easier on my end-user, and I defined the column with a maximum width of 5 characters, and used the APEX currency format mask:

Upon screen item display, a visual header reminds the end-user that the value is expressed in dollars:

Now I must enforce the 99.99 format on the screen.  Below I go into the APEX item validation wizard and specify a regular expression for the 99.99 format as "/d/d./d/d":

Upon testing, APEX catches the formatting error and displays a help error message to the end-user:

In sum, this is just one of many ways to enforce numeric and currency screen item values in APEX.  Mine may not be the most sophisticated or elegant, but it works and only takes a few minutes to code.

If you have a number with hundreds (e.g. 999.99) you can use a more sophisticated regular expression to match a three-digit number, a decimal point, and a two-digit format for cents, like this:

^[-+]?[0-9]\d{0,2}(\.\d{1,2})?%?$


APEX support:

For APEX development support just call to gat an Oracle Certified professional for all APEX development projects.

APEX book and code samples:

Easy Oracle HTML-DB Application Express
Create Dynamic HTML with Oracle

Includes online APEX code depot

Buy it now for 30% off - Only $19.95 

 

 

��  
 
 
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 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational