Hello,
I've got the following problem:
I want to remove and add a subform using "setInstances". In the sample files, there is an interactive purchase order example using a JavaScript and although I use the same syntax, nothing happens.
Question:
Do I have to make any specifications beforehand? What other failure sources could there be?
The subform which is to be added/removed by clicking on a button (Butoonchildren) is called "children", and the JavaScript used is the following:
form1.personal.childrenHeader.Buttonchildren::click - (JavaScript, client)
if (_children.count == 0) {
_chilren.setInstances(1);
this.resolveNode ("caption.value.#text").value = "Clear Subform";
}
else {
_children.setInstances(0);
this.resolveNode ("caption.value.#text").value = "Add Subform";
}
The important thing for me is to add/remove the subform; it is less important whether the text shown on the button changes or not.
Help is greatly appreciated - thank you!