Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

prevent create records in form detial

user555173Apr 1 2014 — edited Apr 1 2014

Good morning to all


I Have 2 blocks master and detail

1'st Block has field (Installment_number)

2'nd  block is detail is tubular

I need to prevent to create records Greater than the number inserted in  (Installment_number s)

I write trigger to get count of rows and compare with (Installment_ number s) and made save when new record instance

But it not prevent create records greater than the (Installment_ number s)

What is the solution or suitable Trigger?

I used triggers  :

When create record

When new record_instance

But it is not work ??

Trigeer

declare

            cursor c_new_recored is

select count(*)

from STD_TAKISAT_STUD_DETIAL

where

user_stud_id=:STD_TAKISAT_STUD.USER_STUD_ID

and TKSAIT_ID=:STD_TAKISAT_STUD.TKSAIT_ID;

v_new_recored number(1);

begin

commit_form;

             open c_new_recored;

             fetch c_new_recored into v_new_recored;

If v_new_recored>:STD_TAKISAT_STUD.APPROVER_NUMBER then

RAISE form_trigger_failure;

message ('??E C? ???? ?II C?C??C? ??C? ???I C????? C??C?');

message ('??E C? ???? ?II C?C??C? ??C? ???I C????? C??C?');

RAISE form_trigger_failure;

end if;

             close c_new_recored;


Regards

Ibrahim

This post has been answered by HamidHelal on Apr 1 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2014
Added on Apr 1 2014
4 comments
450 views