Home » Developer & Programmer » Forms » Only one CheckBox should be checked at a time.
Only one CheckBox should be checked at a time. [message #184154] Tue, 25 July 2006 09:48 Go to next message
marlon_loyolite
Messages: 66
Registered: July 2006
Member
Hi Friends,

This is the scenario,

I have a Master and Detail relationship,in which in the master block I have check box for each associated record.

My requirement is whenever I check a new checkbox (record) in the Master block , the others should be unchecked.

Can anyone help me(Not with radio button).

Regards,
X.Jegan Dhiravium.
Re: Only one CheckBox should be checked at a time. [message #184161 is a reply to message #184154] Tue, 25 July 2006 10:11 Go to previous messageGo to next message
jowahl
Messages: 82
Registered: May 2006
Member
i don't know an easier way, but it should work like this:

1)
store the CURRENT_RECORD in a variable

2)
LOOP throug the records and uncheck all checkboxes, e.g.

BEGIN
FIRST_RECORD;
WHILE :SYSTEM.LAST_RECORD = 'FALSE'
LOOP
:<your_block>.<your_checkbox_item> := 'N';
-- set to value as defined in property "unchecked value"
NEXT_ITEM;
END LOOP;
END;

3)
restore the checked value:

GO_RECORD(<variable>);
:<your_block>.<your_checkbox_item> := 'Y';


disadvantage: the screen may "flicker" because of moving the cursor between the records ...



Re: Only one CheckBox should be checked at a time. [message #184162 is a reply to message #184154] Tue, 25 July 2006 10:12 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you, instead of checkboxes, use radio buttons? Checkboxes can have multiple choices, but only one radio button can be checked at the time.
Previous Topic: frm-12001 Cannot Create Record group
Next Topic: Call procedure inside package
Goto Forum:
  


Current Time: Fri Sep 20 11:35:33 CDT 2024