Avatar

Level 2

Solved myself, using a condition in layout:ready event.

var total = Page.TABLE.DATA.all.length;

var max = Sections.all.length;

if(total <= max) {

var oNewInstance = Page.TABLE._DATA.addInstance(0);

oNewInstance.Title.rawValue =  this.rawValue;

oNewInstance.page.rawValue = xfa.layout.page(this);

xfa.form.recalculate(1);

}

Agustín.