oracle - how to write when-checkbox-changed trigger -
there 2 distinct checkboxes named chkbox_remove_bill, chkbox_print_bill in same block. user can select 1 checkbox @ time. when 1 checked 1 should unchecked. trigger in oracle forms 6i.
i wrote on chkbox_remove_bill, when-checkbox-changed trigger
declare
val number;
begin
if checkbox_checked(:blk_remove.chkbox_remove_bill) val := 0 ; -- replace real unchecked value --:blk_remove.chkbox_print_bill := 1 ;
else val := 1 ; -- replace real checked value --:blk_remove.chkbox_print_bill := 0 ; end if ;
begin if checkbox_checked(:blk_remove.chkbox_remove_bill) <> false :blk_remove.chkbox_print_bill := 0 ; else :blk_remove.chkbox_print_bill := 1 ; end if ; end; exception when others call_note_alert('error');
end;
i wrote on chkbox_print_bill, when-checkbox-changed trigger declare
val number;
begin
if checkbox_checked(:blk_remove.chkbox_print_bill) val := 1 ; -- replace real unchecked value :blk_remove.chkbox_remove_bill := 0 ;
else val := 0 ; -- replace real checked value :blk_remove.chkbox_remove_bill := 1 ; end if ;
begin
if checkbox_checked(:blk_remove.chkbox_print_bill) <> false :blk_remove.chkbox_remove_bill := 0 ; else :blk_remove.chkbox_remove_bill := 1 ; end if ; end; exception when others call_note_alert('error');
end;
/////// when check 1 checkbox, both selected
in form there 2 checkboxes named chkbox_remove_bill, chkbox_print_bill in same block named blk_remove. when form runs, user want check 1 @ time (like radio button). how write trigger on when-checkbox-changed ?
i had changed code, it's working properly
i wrote code on chkbox_remove_bill, when-checkbox-changed trigger. chkbox_remove_bill checked value = 1, unchecked value = 0.
declare
val number;
begin
if(:blk_remove.chkbox_remove_bill = 0)then :blk_remove.chkbox_print_bill := 2; else :blk_remove.chkbox_print_bill := 3; end if; exception when others call_note_alert('error');
end;
i wrote on chkbox_print_bill, when-checkbox-changed trigger. chkbox_print_bill checked value = 2, unchecked value = 3.
declare
val number;
begin
if(:blk_remove.chkbox_print_bill = 2)then :blk_remove.chkbox_remove_bill := 0 ; else :blk_remove.chkbox_remove_bill := 1 ; end if; exception when others call_note_alert('error');
end;
use radio buttons instead of checkboxes
Comments
Post a Comment