Home » Developer & Programmer » Forms » validate item
validate item [message #86909] Fri, 19 November 2004 04:16 Go to next message
Mara Duarte
Messages: 2
Registered: November 2004
Junior Member
could any one please tell me, what is wrong with this code, or what should i add, or do?!?

declare v_qtd_disp exist_material.qtd_disp%type;
begin
 select qtd_disp
 into v_qtd_disp 
 from exist_material e, ord_tip_op oto
 where oto.idmaterial=:ordem_e_operacao.idmaterial and oto.idmaterial=e.idmaterial;

 if(v_qtd_disp < :ordem_e_operacao.QTD_MAT_PREV) then
  message('the qtd you want doesn't exists!!!!');
 end if;
 end;
 

I put this code in when-validate-item trigger in the item QTD_MAT_PREV in the block ordem_e_operacao.

What i want, is too validate the item QTD_MAT_PREV in block ordem_e_operacao, according to the value in the item qtd_disp in the table exist_material.

Is it possible???

I would be very thunkfull if some one could help me.
Re: validate item [message #86941 is a reply to message #86909] Mon, 22 November 2004 11:08 Go to previous message
magnetic
Messages: 324
Registered: January 2003
Senior Member
it is possible
just handle the null values:
if(v_qtd_disp < nvl(:ordem_e_operacao.QTD_MAT_PREV,'x) then
message('the qtd you want doesn't exists!!!!');
end if;'
'x'is a dumy value wich may not exists in the table.
Previous Topic: dynamic lov
Next Topic: Re : too Slow
Goto Forum:
  


Current Time: Sat Sep 07 15:52:05 CDT 2024