Hi everybody
I have an issue with the instance manager.
I have a repeated subform containing a delete button. The delete action works fine until I delete the last instance as I want the action, not only to delete the last instance, but also to hide the entire subform.
I use this script on the click event:
_Person1.removeInstance(this.parent.parent.index);
I tried to put this on the MouseUp: (found it here:
)
if (this.parent.parent.instanceIndex == this.parent.parent.instanceManager.count - 1) {
form1.Personer.presence = "hidden";
// xfa.host.messageBox ("That was it");
}
else {
form1.Personer.presence = "visisble";
// xfa.host.messageBox ("Hello, still more instances");
}
If I have several instances and delete number one or two everything works fine. But if I start with deleting the last instance all previous instances are also removed and the subform “Personer” is hidden. I just wanted to remove one instance at a time.
Hope there is help out there