for-loop over dynamic table to hide buttons | Community
Skip to main content
New Participant
March 10, 2023
Question

for-loop over dynamic table to hide buttons

  • March 10, 2023
  • 1 reply
  • 518 views

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

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Michi_74Author
New Participant
March 10, 2023

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