Home » Developer & Programmer » Forms » checkbox checked (oracle 6i ,windows xp)
checkbox checked [message #442250] Sat, 06 February 2010 00:53 Go to next message
ghadeer
Messages: 25
Registered: February 2010
Location: ksa
Junior Member
Hi ALL,
I have more then one checkbox on my form,I want to get which one is checked on runtime and store it in global variable ???
note : user can check only one

thanks all
ghadeer
Re: checkbox checked [message #442315 is a reply to message #442250] Sat, 06 February 2010 21:33 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
Better, if u use Radio Button.

U can store CheckBox value in GLOBAL variable by using LOOP.
If your All CheckBox is in a BLOCK, u can use FIRST_RECORD to NEXT_RECORD for getting CheckBox value.

Regards.
Tamzidul Amin
Re: checkbox checked [message #442464 is a reply to message #442315] Mon, 08 February 2010 05:03 Go to previous messageGo to next message
ghadeer
Messages: 25
Registered: February 2010
Location: ksa
Junior Member
Hi ,
many Thanks..
you can explain me more how can store the checked value and deselect the others
Re: checkbox checked [message #442465 is a reply to message #442250] Mon, 08 February 2010 05:12 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Are there multiple checkboxes in a single record?
Or one checkbox repeated across multiple records?

It it's the first case use a radio group instead.
Otherwise use the code Litttlefoot put in this thread
Re: checkbox checked [message #442468 is a reply to message #442465] Mon, 08 February 2010 05:23 Go to previous messageGo to next message
ghadeer
Messages: 25
Registered: February 2010
Location: ksa
Junior Member
actually I have one field for every checkbox ,So Icouldnt
use radioButtons
Re: checkbox checked [message #442469 is a reply to message #442250] Mon, 08 February 2010 05:29 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So they're all on the same record?
Then they should be one field if they're mutually exclusive, I suspect your table design is wrong.

If you're stuck with checkboxes then you're just going to have to write a bit of code in each WHEN-CHECKBOX-CHANGED trigger than unchecks all the other checkboxes if the current one is checked.
Re: checkbox checked [message #446696 is a reply to message #442469] Wed, 10 March 2010 00:43 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

If you are always deselecting the others then you will only ever have one selected at any one time. Store the 'get_block_property(current_record)' when you do the first select and then when you do the next select, go to that row, deselect it, and then go back to the row from which you started.

David
Previous Topic: Oracle Forms Resolutions
Next Topic: How can I get window handle?
Goto Forum:
  


Current Time: Fri Sep 20 10:43:48 CDT 2024