Expand my Community achievements bar.

RadioButtonList - Riddle - URGENT

Avatar

Level 2
Dear Community,



I have a riddle I am unable to solve:

I have a RadiobuttonList with eight items the bindings tab has them connected to the rawValues 1-8. Also on my form there is a form connected to a checkbox with the rawValue 0 and 1



If the RadioButtonList has a rawValue == 8

3 other subforms have to dissapear no matter what the checkbox says.



If the RadioButtonList has a rawValue != 8 and the checkbox is checked

three subforms have to appear.



If the RadioButtonList has a rawValue != 8 and the checkbox isn't checked

two subforms have to appear and one subform has to dissapear:



The folowing script has first been placed in the "click" event of the "RadioButtonList" (not of each RadioButton) and afterwards in the "change" event of the RadioButtonList (not of each RadioButton):



if (this.rawValue != "8")&&(xfa.form.Formular1.superframe.administratormain.computerdistribution.multipleschoolforms == "1")

{

xfa.form.Formular1.superframe.administratormain.administrator3.presence = "visible"

xfa.form.Formular1.superframe.administratormain.administrator4.presence = "visible"

xfa.form.Formular1.superframe.administratormain.administrator5.presence = "visible"

}

else if (this.rawValue != "8")&&(xfa.form.Formular1.superframe.administratormain.computerdistribution.multipleschoolforms == "0")

{

xfa.form.Formular1.superframe.administratormain.administrator5.presence = "hidden"

xfa.form.Formular1.superframe.administratormain.administrator3.presence = "visible"

xfa.form.Formular1.superframe.administratormain.administrator4.presence = "visible"

}

else if (this.rawValue == "8")&&(xfa.form.Formular1.superframe.administratormain.computerdistribution.multipleschoolforms == "0")

{

xfa.form.Formular1.superframe.administratormain.administrator5.presence = "hidden"

xfa.form.Formular1.superframe.administratormain.administrator3.presence = "hidden"

xfa.form.Formular1.superframe.administratormain.administrator4.presence = "hidden"

}

else if (this.rawValue == "8")&&(xfa.form.Formular1.superframe.administratormain.computerdistribution.multipleschoolforms == "1")

{

xfa.form.Formular1.superframe.administratormain.administrator5.presence = "hidden"

xfa.form.Formular1.superframe.administratormain.administrator3.presence = "hidden"

xfa.form.Formular1.superframe.administratormain.administrator4.presence = "hidden"

}



However it does not work as the script has the subforms appear as I check the checkbox but doesn't have them dissappear again once I choose the "rawValue == 8"-option in the RadioButtonList.

Please tell me which event do I have to pick - and why does my script ignore the choices I make in the RadioButtonList ?!
16 Replies