Avatar

Level 5

jasotastic81, thanks for your response.  I haven't been able to get that code to work.  I'm using LCD ES2 and opening the resulting PDF in Acrobat X.  The Add User button has no effect.

temp.png

I have the Remove User button initially set to Hidden.

In the Add Users button, I added your script, but had to tweak the name a little bit to match my object hierarchy.  I also reversed the order of the two lines, figuring the Remove User button has to be made visible before the row gets copied -- does that make sense?


xfa.resolveNode("Page1.UsersRequiringAccess.Table1.RowUserName["+0+"].RemoveUser").presence = "visible"; // Set the button to visible before copying the row


Page1.UsersRequiringAccess.Table1.RowUserName.instanceManager.addInstance();








In the Remove User button, I added:


xfa.resolveNode("Page1.UsersRequiringAccess.Table1.RowUserName["+0+"].RemoveUser").presence = "visible";


Page1.UsersRequiringAccess.Table1.RowUserName.instanceManager.addInstance();







In the form layout:ready event I added


if(Page1.UsersRequiringAccess.Table1.RowUserName.instanceManager.count == 1) xfa.resolveNode("Page1.UsersRequiringAccess.Table1.RowUserName["+0+"].RemoveUser").presence = "hidden"; 


else xfa.resolveNode("Page1.UsersRequiringAccess.Table1.RowUserName["+0+"].RemoveUser").presence = "visible";


This also brings me to a couple of questions:  What's the difference b/w having "()" or "(1)" at the end of "addInstance".  When I type in the script and use the automatic pop-up text, it adds "([b1])" at the end.

Also, what is the purpose of "["+0+"]" in your script?

Thanks again for your help.