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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Delete row 1 buttons on repeatable tables

DKinsley
Level 9
Level 9

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";

}

1 Accepted Solution
DKinsley
Correct answer by
Level 9
Level 9

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";

}

View solution in original post

1 Reply
DKinsley
Correct answer by
Level 9
Level 9

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";

}

View solution in original post