Dynamically increase the table row | Community
Skip to main content
May 27, 2022

Dynamically increase the table row

  • May 27, 2022
  • 2 replies
  • 836 views

Trying to increase the rows of a table dynamically, seems like the rows are increased and values assigned to the column. Able to verify these with the alert statement. But when form is rendered, no additional rows are displayed.

 

Used the following java script in the initialize event of the table.

Please let me why the newly added rows are not showing up.

 

RootForm.Page2.Table7::initialize -

var rowLength=xfa.resolveNodes("xfa.datasets.data.root.parentNode[*]").length;
//app.alert(rowLength);
for(var index=0; index < rowLength; index++){
//app.alert(index);
var oRowInstance=RootForm.Page2.Table7.resolveNode("Row1[" + index + "]");
oRowInstance.Cell1.rawValue="10";
oRowInstance.Cell2.rawValue=18;
//app.alert(oRowInstance.Cell1.rawValue);
//app.alert(oRowInstance.Cell2.rawValue);
oRowInstance.instanceManager.addInstance(true);
xfa.form.recalculate(true);

}

 

Thank you

 

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

2 replies

Mayank_Gandhi
Adobe Employee
Adobe Employee
May 27, 2022

@eshwarign Make sure the max count is set for the row that will be repeated and the panel is flowable

EshwarignAuthor
May 27, 2022

It is set as mentioned, 'repeated row each data item' min count as 1 and Max is not set, and the sub form is flowable. Still only one row is showing up. I even tried to set the visibility of the column. But the same result.

radzmar
May 27, 2022

The line xfa.resolveNodes("xfa.datasets.data.root.parentNode[*]").length; is nonsense, as it simply resolves xfa.datasets.data which is always a single node.

 

What exactly are your trying to do with you table?