Solved

How to validate a text item/display item in Oracle forms 9i?

Posted on 2009-07-07
2
1,715 Views
Last Modified: 2013-12-19
Hello Everyone,

I have a form in which we have to type in a product_id as shown below in the screenshot. And when we type in, it has to get validated.
If it is valid then ok, else display a message saying not valid.

How do we achieve it on a text box/diaply item in the form shown below.

Any kind of help would be really appreciated.

Thanks in advance,
      Vishal
reb-rule-1.JPG
0
Comment
Question by:vishal_singh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:gkhngkdmr
ID: 24800979
For the di_prod  text item, you can create a WHEN-VALIDATE-ITEM trigger.
In this trigger, you can make your control for the value in the item.
0
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 500 total points
ID: 24803909
I agree.  A "when-validate-item" trigger on the di_prod item is the best way to do this in Oracle Forms.
Your trigger can either query the database directly to see if the value entered is valid or not, or (even better) the trigger can pass the value entered to a PL\SQL function in a database package that will query the database to see if the value passed in is correct or not, and return a "Y" or "N" to the the form trigger.  That can evaluate the value returned by the function and do nothing if "Y" (valid) or display a message (or alert) if the value is invalid, and prevent the user from leaving this field until the value is corrected.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question