checkbox checked [message #442250] |
Sat, 06 February 2010 00:53  |
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   |
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 #442465 is a reply to message #442250] |
Mon, 08 February 2010 05:12   |
cookiemonster
Messages: 13963 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 #442469 is a reply to message #442250] |
Mon, 08 February 2010 05:29   |
cookiemonster
Messages: 13963 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  |
 |
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
|
|
|