6 Replies Latest reply on Jun 16, 2009 12:48 PM by AJP256

    Radio Button Confusion

    AJP256 Level 1

      Hello.  I'm trying to use a yes/no radio button group to add and delete instances of a subform.  I can get the yes button to add an instance without any problem, but when I try to make the no button delete the instance, it fails.  Below is the script I'm trying to use.  I'm putting it in the "Change" section

       

      if (this.rawValue=='1')

                     _SubformName.addInstance(1)

                     xfa.form.recalculate

       

      if (this.rawValue=='2')

                     _SubformName.removeInstance(1)

                     xfa.form.recalculate(1)

       

      I have everything set to flowed and am saving as a dynamic file, so that isn't the problem.  Any help would be appreciated.