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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

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