no navigation happening [message #328458] |
Fri, 20 June 2008 04:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sharathmpatil
Messages: 38 Registered: February 2008 Location: Bangalore
|
Member |
|
|
hi,
Please observe the code in the attachment.The cursor is not moving to the next specified item .Please check out and specify the solution.
Thanks in advance
-
Attachment: code.txt
(Size: 0.55KB, Downloaded 976 times)
|
|
|
|
|
Re: no navigation happening [message #328467 is a reply to message #328464] |
Fri, 20 June 2008 05:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sharathmpatil
Messages: 38 Registered: February 2008 Location: Bangalore
|
Member |
|
|
Hi littlefoot,
Next item is quantity field.But the tray number is alphnumeric so it is made as character type.The value of count is correct.And its also validating whether the tray_no is 8 digits or not but the navigation i,e its not going to the next field.
Regards
|
|
|
|
|
Re: no navigation happening [message #328584 is a reply to message #328458] |
Fri, 20 June 2008 09:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Martin Eysackers
Messages: 80 Registered: October 2005 Location: Belgium
|
Member |
|
|
I put some remarks about your code in bold
declare
mcount char(8);
a number;
begin
if :iss.tray_no is null then
g.dummy := g.cent('Tray No. Cannot be Blank',1,1);
raise form_trigger_failure;
[B]this will never happen you just stopped the trigger in the previous line[/B]
go_item('tray_no');
end if;
select count(*) into mcount from iss
where rtrim(lower(tray_no)) = lower(rtrim
[B]should it not be :iss.trayno without ''[/B]
(':iss.tray_no')) and
sl_no <> :iss.sl_no;
if mcount > 0 then
g.dummy := g.cent('Tray No. already exists',1,1);
raise form_trigger_failure;
end if;
a := length(':iss.tray_no');
[B]a will always be > 8, you probably meant length(:iss.tray_no)[/b]
if a != 8 then
raise form_trigger_failure;
end if;
[B]you probably meant without :, also if a <> 8 you never get here[/B]
go_item(':iss.qty');
end;
and like Littlefoot said, use number instead of char(8)
[EDITED by LF: disabled smilies in this message]
[Updated on: Fri, 20 June 2008 15:23] by Moderator Report message to a moderator
|
|
|
|
|