Reputation: 11
I have a form that has two checkboxes, one is dup and one is sum. They both take values, add them up, and display the total in a display item. I have that part covered in an if statement on both checkboxes. What I need some assistance with, is a third if statement that, if sum is checked and the user checks dup, oracle forms pops up a message, uncheck the dup checkbox, and does nothing else. Here is the code I have so far :
IF :mn_outstanding_trans.cb_duplicate_activity ='Y' THEN
:mn_outstanding_trans.activity_cd := 'SUM';
:bl_control.gross_sum_of_trxs := :bl_control.gross_sum_of_trxs + :mn_outstanding_trans.gross_amt;
:bl_control.net_sum_of_trxs := :bl_control.net_sum_of_trxs + :mn_outstanding_trans.net_amt;
:bl_control.previous_activity_cd := :mn_outstanding_trans.activity_cd;
ELSIF :mn_outstanding_trans.cb_duplicate_activity ='N' THEN
:mn_outstanding_trans.activity_cd := ' ';
:bl_control.gross_sum_of_trxs := :bl_control.gross_sum_of_trxs - :mn_outstanding_trans.gross_amt;
:bl_control.net_sum_of_trxs := :bl_control.net_sum_of_trxs - :mn_outstanding_trans.net_amt;
:bl_control.previous_activity_cd := :mn_outstanding_trans.activity_cd;
END IF;
Upvotes: 0
Views: 100
Reputation: 143033
if sum is checked and the user checks dup, oracle forms pops up a message, uncheck the dup checkbox
It seems that you want to allow either DUP or SUM checkbox set, but never both. If that's so, then you should use a radio button instead of two checkboxes (which are supposed to exclude each other).
Also, maybe it would be easier to understand what you're talking about if you posted a screenshot of that form.
Upvotes: 2