


Hi community,
I'm just trying to create a xdp template for a customer. I am a total beginner when it comes to Adobe. Everything works fine except the subtotal field. It would be great if you could help me out with the right formula. Here's what I got so far...
Table design:
"Euro" field (DecBetragNetto): visible, decimal field, read only, binding works
"Dezimalfeld" field (subtotal field named "Sum"): visible, decimal field, calculated - read only, no data binding
Page structure:
Output:
This is just an example output screenshot which calculates the sum of line 1.* I thought that my problem could be solved using Sum(xfa.resolveNode("FormQuoteNotification.bdyPage1.SubFrmTble.Table1.Row1[*].DecBetragNetto[*]")) but the output field stays empty.
Please help.
*Formula: Sum(xfa.resolveNode("FormQuoteNotification.bdyPage1.SubFrmTble.Table1.Row1.DecBetragNetto"))
Views
Replies
Sign in to like this content
Total Likes
You need to execute a loop through all the table rows like this and calculate the Total, something like this in JS:
var rows = this.resolveNodes("FormQuoteNotification.bdyPage1.SubFrmTble.Table1.Row1[*]"); total = 0; for(var i =0; i<rows.length;i++) { total= total+rows.item(i).DecBetragNetto.rawValue; }
FormQuoteNotification.bdyPage1.SubFrmTble.sum.rawValue=total;
You need to execute a loop through all the table rows like this and calculate the Total, something like this in JS:
var rows = this.resolveNodes("FormQuoteNotification.bdyPage1.SubFrmTble.Table1.Row1[*]"); total = 0; for(var i =0; i<rows.length;i++) { total= total+rows.item(i).DecBetragNetto.rawValue; }
FormQuoteNotification.bdyPage1.SubFrmTble.sum.rawValue=total;