Problem with post text item trigger [message #218000] |
Tue, 06 February 2007 05:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mk_agg1969
Messages: 19 Registered: August 2006 Location: india
|
Junior Member |
|
|
Dear All,
I am having a form which is based on master detail relationship.
For example in detail block I have following feilds:
Debit_credit_flag, Ex_Rate, Currency_amount, D_Amt, C_Amt.
I written some validation code on Feild Currency_Amount on Post_Text_Item trigger as under:
If Nvl(:vchr_dtl.currency_amt,0) <= 0 then
Declare
alt number;
Begin
--
Set_alert_property('w_msg',alert_message_text,
'Currency Amount Should Be Greater Than Zero');
alt := Show_alert('w_msg');
Raise Form_trigger_failure;
--
End;
End If;
--
if :ref_vchr_no is not null then
If Nvl(:vchr_dtl.currency_amt,0) > :global.bill_amt then
Declare
alt number;
Begin
--
Set_alert_property('w_msg',alert_message_text,
'Currency Amount Should not Be Greater Than Bill Amount.');
alt := Show_alert('w_msg');
Raise Form_trigger_failure;
--
End;
End If;
end if;
Now say if user has entered 14 records in detail block and in 15th record user by mistake entered a record having bill_amt as 0.00 then system will not allow him go out of the text box.
Is there any way to change the code little bit without disturbing the controls which mentioned above.
Your quick response will help me a lot.
Regards,
Manoj Aggarwal
|
|
|
|
|