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

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
vishal_singhAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Mark GeerlingsConnect With a Mentor Database AdministratorCommented:
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
 
gkhngkdmrCommented:
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
All Courses

From novice to tech pro — start learning today.