Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check_box problem

Status
Not open for further replies.

LimonaM

Programmer
Oct 27, 2004
50
SI
Hello.

How can i programm that when i check more than one check_box then something else hapens as if i change only one check_box.

Problem:
when i check only one box then i just go to another item and so on
i can check all check_boxes whith a button and then jump to another block (when-button-pressed trigger).
now i want, that i check one box and then another and another and jump to another block. Trigger must somehow watch over boxes. if i checked 1, 2, ... When-checkbox-changed trigger has to watch that if there is more than one box checken but not all.

 
I don't entirely understand what you're trying to do, but you should just be able to read the value of your checkbox fields and program whatever you want according to those values.

For example, if the value when checked is 'Y' and value when unchecked is 'N', you can simply say:

if :block.checkbox1 = 'Y' and :block.checkbox2 = 'N' ... then
.....
end if;
 
I think you need to scan down all the checkboxes in your block.

Assuming each checkbox is the same item in a multi-record block, try something like this:

DECLARE
l_record NUMBER := :SYSTEM.CURSOR_RECORD;
l_multiple BOOLEAN := FALSE;
BEGIN
First_Record;
--
LOOP
IF :block.checkbox = 'Y'
THEN
IF l_multiple
THEN
message('More than one checkbox checked');
Exit;
END IF;
--
l_multiple := TRUE;
END IF;
--
Exit WHEN :SYSTEM.LAST_RECORD = 'TRUE'
END LOOP;
--
First_Record;
Go_Record(l_record);
END;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top