Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Please help with Instance Manager

_Venus_Nix_
Level 1
Level 1
Hello,



I created a button that will show/hide a subform. The issue is I need multiple buttons like this. I thought changing the name of the subform in this script would allow me to use another button for a different subform. For instance, Instead of using the word Alabama I could replace it with Alaska and it would show/hide that subform. Could having multiple pages in a subform affect its functionality? Please Help!



// Invoke the Instance Manager to add and remove the alabama subform.



if (fAlabama.value == "0") { // fAlabama is a document variable used as a flag.

// fAlabama = 1 when the alabama subform is displayed.

_alabama.setInstances(1); // Add the comments subform.

this.resolveNode("caption.value.#text").value = "Clear Alabama"; // Change the button's caption.

fAlabama.value = "1"; // Set the flag value.

}



else {

_alabama.setInstances(0); // Remove the alabama subform.

this.resolveNode("caption.value.#text").value = "Add Alabama"; // Change the button's caption.

fAlabama.value = "0"; // Reset the flag value.

}



Thanks,



Venus
0 Replies