Using Radio Buttons as Targets of Dependencies

If a selected radio button is hidden or disabled because of a dependency, another radio button is selected using these criteria:
  • If a default radio button that has been specified is visible or enabled, then the default radio button is selected.
  • If a default radio button has not been specified or if the default radio button is hidden or disabled, the first available radio button is selected. The order of the radio buttons is determined in the UI element.
If you want to hide or disable a group of radio buttons, you must create a single dependency that targets the variable for the radio buttons. If you create a dependency for each radio button, the result is incorrect behavior.
This example demonstrates the correct and incorrectbehavior:
<UI>
   <Container option="optionsTab">
      <Group option="RadioButtonGroup open="true">
         <OptionItem option="Radio1"/> <!-- variable="radioVariable1" -->
         <OptionItem option="Radio2"/> <!-- variable="radioVariable1" -->
         <OptionItem option="Radio3"/> <!-- variable="radioVariable1" -->
         <OptionItem option="Checkbox1"/>
      </Group>

      <Group option="RadioButtonGroup2 open="true">
         <OptionItem option="Radio4"/> <!-- variable="radioVariable2" -->
         <OptionItem option="Radio5"/> <!-- variable="radioVariable2" -->
         <OptionItem option="Radio6"/> <!-- variable="radioVariable2" -->
         <OptionItem option="Checkbox2"/>
      </Group>
   </Container>
</UI>

<Dependencies>
1<!-- Correct -->
   <Dependency condition="!($Checkbox1 =='1')">
      <Target option="radioVariable1" conditionResult="true" action="show"/>
      <Target option="radioVariable1" conditionResult="false"action="hide"/>
   </Dependency>
  
2<!-- Incorrect -->
   <Dependency condition="!($Checkbox2 =='1')">
      <Target option="Radio4" conditionResult="true" action="show"/>
      <Target option="Radio4" conditionResult="false" action="hide"/>
      <Target option="Radio5" conditionResult="true" action="show"/>
      <Target option="Radio5" conditionResult="false" action="hide"/>
      <Target option="Radio6" conditionResult="true" action="show"/>
      <Target option="Radio6" conditionResult="false" action="hide"/>
   </Dependency>
</Dependencies>
1 The first dependency creates a single dependency that targets the variable for the radio buttons.
2 The second dependency creates a dependency for each radio button, which results in the incorrect behavior.