Solved

Code in WHEN-VALIDATE-ITEM not firing!

Posted on 2001-08-24
3
1,366 Views
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?

Thanks,
Brian

------------------------

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

begin
   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');
      list_values;
   else
      -- The status code is valid, so display the status description.
      :txtStatusName := StatusRow.SEI_Inv_Description;
   end if;

   close c_Status;
end;
0
Comment
Question by:bek
[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
3 Comments
 
LVL 5

Accepted Solution

by:
FBIAGENT earned 50 total points
ID: 6423541
BEK,

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
0
 
LVL 2

Expert Comment

by:santoshmathew
ID: 6423596
Hi,

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

cheers.
0
 

Author Comment

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

-Brian
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
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…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

733 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