Solved

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

Posted on 2009-07-07
2
1,624 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
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 34

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now