Home » Developer & Programmer » Forms » LOV and Text item--funny thing...any help??????
LOV and Text item--funny thing...any help?????? [message #80776] Wed, 20 November 2002 05:23 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I have a text item which i attached with an LOV.This LOV is used for that text field validation.
That text field represents one column in a table.
That column can take duplicate values also.
So when i enter an invalid value the LOV pops up and it works fine.

If i enter valid value first time it accepts.
But After doing some operations with other fields am setting the focus to this text field where the same entered valid value remains.

Here its displaying that LOV with the entries of that entered value.Here if i close that LOV,without choosing the value(cos the same value is in text field),its giving the error

FRM-40212 : INvalid value for field :field name

Note here i have the same entered value twice here in table column( or in LOV).

Here is my data:
Suppose i have col1 in table1 with the following values:
3333
2222
3333
5555
6666

Here if i choose 3333 from LOV first time it accepts,but after doing some operations in the form am setting the focus to this field,
here the LOV displays only
3333
3333,
it makes me to click ok unneccessarily.If i omit that it gives that error.
So any idea to over come this???
I hop i`ll get some replies from you...

Thanks & Regards
Victoria
Re: LOV and Text item--funny thing...any help?????? [message #80786 is a reply to message #80776] Thu, 21 November 2002 22:22 Go to previous message
kashif masood hashmi
Messages: 10
Registered: June 2002
Junior Member
CONSIDER THE FOLLOWING EXAMPLE
CREATE A LOV WITH FOLLOWING STATEMENT
SELECT DISITINCT JOB FROM EMP
WHERE JOB LIKE :GLOBAL.VAR||'%'
WRITE DOWN THE TRIGGER ON FORM LEVEL
WHEN NEW FORM INSTANCE
declare
timer_id timer; one_minute number(5):=100;
chk_timer timer; chk_min number(5):=200;
begin
timer_id:=create_timer('emp_timer'one_minute,repeat);
:global.var:='CLERK';
:global.chk:=0;
end;
WHEN TIMER EXPIRED
:global.var:=nvl(rtrim(:job),'CLERK');
declare
aa boolean
chk_timer varchar2(20):=get_application_property(timer_name);
begin
if :job is not null and :global.chk:=0 then
show_lov('designation');
delete_timer('emp_timer'); :global.chk:=1; end if;
if upper(chk_timer)='CHK' and :global.chk=1 and :job is null then
declare
timer_id timer; one_minute number(5):=100;
begin
timer_id:=create_timer('emp_timer'one_minute,repeat);
:global.var:='CLERK';
end;
:global.chk:=0;
end if;
end;

Above example help you to solve your problem. if your problem solved or still not completed then send me a mail.
Thanks
Kashif.
Previous Topic: hand sign as mouse pointer
Next Topic: Connectivity of Developer 6 with Oracle 9i Personal Edition
Goto Forum:
  


Current Time: Thu Mar 28 20:51:34 CDT 2024