Avatar

Level 10

No, just paste it into the calculate event of form1.#subform[0].Table1.Row22.SUMExpenses and change the langauge to JavaScript.  Here's a link to a version I used to test the script.  https://acrobat.com/#d=CZiwMcAdnAfgicYa-oTD8g

You could have renamed the rows, it would have made the script a little easier, so the line

     var rows = xfa.resolveNodes("Table1.*.(className=='subform')");

could have been something like

     var rows = xfa.resolveNodes("Table1.Row[*]");

or maybe even a prue JavaScript version;

     for (var i=1; i<Table1.Row1.nodes.length; i++)
     {
           result += Table1.Row1.nodes.item(i).rawValue
     }

And if you only renamed the rows with the cells PrePaid and Amount you would not need the line "if (item.PrePaid)" which was only there to filter out the header and subtotal rows.

Though, I tend not to battle with the way Designer generates fixed size tables ... maybe it depends on how many forms you have to do.

Bruce