Avatar

Level 4

Well, that helps, but now my delete button is too enthusiastic.  To be clear, I want the radio button to change after I delete the final instance of the subform.  When I click the delete button, it will deletes more than one instance.  It's a bit inconsistent, since if I click on the delete button in the first instance of the subform (each subform has its own delete button that is supposed to delete that instance) all the instances are deleted and the radio button value is switched, but when I click on the delete button in a subsequent instance, all the instances except the first one are deleted.  Here's my script, and I'm e-mailing this to you what I have.

if (Subform_Name.instanceManager.count='1')

          Radio_Button_Group.rawValue='2'; // 2 is the value associated with the "no" button

_Subform_Name.removeInstance(this.parent.parent.index);

xfa.form.recalculate(1);