Code in WHEN-VALIDATE-ITEM not firing!

Posted on 2001-08-24
Last Modified: 2007-12-19
I am checking the validity of text entered in the WHEN-VALIDATE-ITEM.  If the character ("status code") isn't in another table, I want to pull up an LOV.  Apparently, I can't display an LOV from the WHEN-VALIDATE-ITEM trigger.  Below is my code.  Is there an alternate way to display an LOV when incorrect data is entered into the text field?



   cursor c_Status is
      select *
         from SEI_Statuscode
         where SEI_Inv_Statuscode = :txtStatusCode
         order by SEI_Inv_Order;
   StatusRow c_Status%rowtype;

   open c_Status;
   fetch c_Status into StatusRow;

   if (c_Status%NOTFOUND) then
      -- If I can't display an LOV here, could I instead execute
      -- the click event of a button?
      go_item ('txtStatusName');
      -- The status code is valid, so display the status description.
      :txtStatusName := StatusRow.SEI_Inv_Description;
   end if;

   close c_Status;
Question by:bek

Accepted Solution

FBIAGENT earned 50 total points
ID: 6423541

You can associate an LOV with an item by specifying the name of the LOV in the LOV Properties of a text item.  If you want user input to be validated against the LOV, then you need to set the property LOV For Validation to True.
You don't need the WHEN-VALIDATE-ITEM trigger for the text item if you do the aforementioned.

Also, in your LOV, you can specify the fields to be populated when the user select a value from the LOV via the Column Mapping Property in the LOV.
In your form, you also need a POST-QUERY trigger to populate the control field(s) (just like what you did in the WHEN-VALIDATE-ITEM trigger for :txtStatusName.

Good luck

Expert Comment

ID: 6423596

There is an Lov property : I think it is Validate from lov. Set this property to true.


Author Comment

ID: 6444877
Sorry for the delay in giving credit.  I got tied up struggling with my project.  Thanks again!


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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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 syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

706 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

17 Experts available now in Live!

Get 1:1 Help Now