Delete row 1 buttons on repeatable tables

DKinsley 08-09-2016

I have a button in Row1 of a repeating table that adds additional rows. I want to be able to hide all of these buttons by clicking another button located at the bottom of the form. Can you tell me how to script to count the table instances and then set the presence of each button to be "invisible"?

This is my script that does not work:

var vRows = Table1.instanceManager.count;

for (i=vRows;i>0;i--){

xfa.resolveNode("Table1[" + i + "]").Row1.button1.presence = "invisible";

}

Accepted Solutions (1)

Accepted Solutions (1)

DKinsley 08-09-2016

I was able to solve this myself. The script that works is:

var nRows = xfa.resolveNodes("Table1[*].Row1[*]");

for (var i=0; i<nRows.length; i++)

{

nRows.item(i).Subform13.AddQuestionButton.presence = "invisible";

nRows.item(i).Subform13.DeleteLastQuestionButton.presence = "invisible";

}

Answers (0)