cancel
Showing results for 
Search instead for 
Did you mean: 

Personas Radio Button

michael_olijnyk
Explorer
0 Kudos

I have created a radio button group with 3 buttons (the first button is the default). No matter which button is selected, the first branch of my script always executes. I have verified the session.findById values several times. I have tried on both 3.0SP03 and 3.0SP04. This should be pretty simple, but obviously am overlooking something. Anyone have similar issues with radio buttons? Thanks

if(session.findById("wnd[0]/usr/radPersonas_148130827323194").selected=true){ companyCode = "TA01"; session.utils.log("branch1");} else if(session.findById("wnd[0]/usr/radPersonas_148130828546524").selected=true){ companyCode = "MA01"; session.utils.log("branch2");} else if(session.findById("wnd[0]/usr/radPersonas_148130830677553").selected=true){ companyCode = "MA02";}

Accepted Solutions (0)

Answers (1)

Answers (1)

bwills
Contributor
0 Kudos

Two things. First you don't need to put the "=true", because the selected will return "true" or "false". Secondly if you want the true in there it needs to be "==true". Two equal signs. Two equal signs is a comparison. One equal sign is assigning.