Expand my Community achievements bar.

for-loop over dynamic table to hide buttons

Avatar

Level 1

Hello,

 

I have a form with a dynamic table. You can add or remove rows via buttons.

Before sending the form I want to execute a for-loop over the rows to hide these buttons.

 

The message box shows the right number of rows:

xfa.host.messageBox("Number of rows: " + Formular1.receipt.table.dataRow.instanceManager.count);

 

But unfortunately I don't know the commands for the loop. Any help really appreciated.

 

Thanks and regards,

Michi

 

Michi_74_1-1678449068684.png

 

 

1 Reply

Avatar

Level 1

Solved it right now - after lunch 

 

The commands are:

 

var numberRows = Formular1.receipt.table._dataRow.count;

for (var i = 0; i < numberRows; i++)
{ resolveNode("Formular1.receipt.table.dataRow[" + i + "]").rowPlusMinus.btnPlus.presence = "invisible";
resolveNode("Formular1.receipt.table.dataRow[" + i + "]").rowPlusMinus.btnMinus.presence = "invisible";
}