Creating an Expanding Table that Calculates in Adobe LiveCycle ®

This video demonstrates using Adobe LiveCycle, JavaScript and FormCalc to create a flowing / expanding table that can calculate totals in the table footer.


Code used in this example:


JavaScript in the Expanding Table Buttons:

Add Button – 

 var rowNum = this.parent.parent.index +1;
 this.parent.parent.instanceManager.addInstance(rowNum);

Del Button – 

try
  {
    var rowNum = this.parent.parent.index;
    this.parent.parent.instanceManager.removeInstance(rowNum);
  }
catch(err)
  {
   app.alert(“The minimum number of rows is 1”);  
  }

FormCalc in the Calculate Event of the Totals Cell in Footer Row:

 $.rawValue = Sum(Table1.Row1[*].Cell4);

Leave a Reply

HTML Snippets Powered By : XYZScripts.com