Radio Buttons

Frosty the Coder

Legendary Poster
List,

It's been a while since I've added radio buttons to a form, and I cannot figure out what I'm doing wrong.

I inserted three radio buttons and inserted a Group Box around them.
I then changed each of the buttons to be DD item EV01.
I set the properties of each of the buttons to have a value of 1.

When I run the APPL locally, the buttons display correctly, but DEBUG shows that they all have a value of '1'.
When I push any one of them, they all retain the value of '1'.

I tried removing the value from from the properties, DEBUG shows all three as "null", and pushing them does not change the value.

I compared my code and setup to a vanilla APPL and mine looks correct.
(Looks can be deceiving, and it this case they are)

Can any of you give insight as to what I've done incorrectly or have omitted?

Thanks VERY much.
 
Hello

I tried out the above on DEMO 9.0 and found that it is working as described by you. I think maybe it is working as desired. However you can create form level variable and assign it the value of the selected RB and then blank out the other 2 variables as below:

=======================================================================
CONTROL: RADBTN RB 1
EVENT: Selection Changed
-----------------------------------------------------------------------
0001 VA frm_cRB1Value_EV01 = FC RB 1
0002 //
0003 If VA frm_cRB1Value_EV01 is equal to "1"
0004 VA frm_cRB2Value_EV01 = ""
0005 VA frm_cRB3Value_EV01 = ""
0006 End If

=======================================================================
CONTROL: RADBTN RB 2
EVENT: Selection Changed
-----------------------------------------------------------------------
0001 VA frm_cRB2Value_EV01 = FC RB 2
0002 //
0003 If VA frm_cRB2Value_EV01 is equal to "1"
0004 VA frm_cRB1Value_EV01 = ""
0005 VA frm_cRB3Value_EV01 = ""
0006 End If

=======================================================================
CONTROL: RADBTN RB 3
EVENT: Selection Changed
-----------------------------------------------------------------------
0001 VA frm_cRB3Value_EV01 = FC RB 3
0002 //
0003 If VA frm_cRB3Value_EV01 is equal to "1"
0004 VA frm_cRB1Value_EV01 = ""
0005 VA frm_cRB2Value_EV01 = ""
0006 End If

Let me know if above (workaround) solves your issue.
 
You may be confusing radio buttons with check boxes. Radio buttons are not a 0/1 value type of control like a check box. They each need to have a unique value (1,2,3, etc.). Further more, in ER code, a group of radio buttons act like one control in that you only need to reference one of them in your ER code to get the value of the selected radio button... which I always found to be very confusing - this is why in the debugger you are seeing that they all have the same value... because they do.

Oracle should have given us a check box group control with the count of check boxes in the control being a property of the control so that you could reference this check box group control in code instead of just picking one of the check boxes.
 
They each need to have a unique value (1,2,3, etc.).

That's the part I had forgotten!
Changing them to have values of 1, 2, and 3 accomplished what I was trying to do.

Thank you VERY much!
 
Back
Top