Hello,
I have a field named DurFramesDurationMin within a repeating subform. Here is the full path: employees.P1.ListGroup.Add_subform.DurFramesDurationMin
I would like to have a field total the rawValue of all instances of this field. I have tried the following:
(FormCalc, client)
$.rawValue = sum(employees.P1.ShotListGroup.AddShot_subform[*].DurFramesDuration2);
(Javascript, client)
var fields = xfa.resolveNodes("employees.P1.ListGroup.Add_subform[*].DurFramesDurationMin");
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
total = total + fields.item(i).rawValue;
}
this.rawValue = total;
The total field is on a master page so that it shows you current total at all times (I will set this to Global binding I assume to make this work).
Thanks for any and all help!
Views
Replies
Total Likes
Paul,
Thanks for the response. On my form it does total the first field but does not total the instances of that field. Should I reference the instance manager in the same script?
Views
Replies
Total Likes
Could you post your form? I'll check it.
BR,
Paul Butenko
Views
Replies
Total Likes
Here you go and thanks. totalminutes should total all data in every instance of DurFramesDuration2...
Again, it will see the data for the first one but not the second...there is no calculation going on for the others...
BTW, I deleted much of the content to make it easier - it shouldn't have broken anything though.
Views
Replies
Total Likes
Hi,
Main problem is that you were trying to take wrong subform - employees.P1.ShotListGroup[*].AddShot_subform[*] instead of employees.P1.ShotListGroup.AddShot_subform[*].
On layout ready event of totalminus i wrote function which calculates total.
See attach.
BR
Views
Replies
Total Likes
Thanks for the response - day 5 of waiting for the form to become available to view...
Views
Replies
Total Likes
I can send it to you, just post your email.
BR
Views
Replies
Total Likes
ebuxton@gmail.com
Thanks again...
Views
Replies
Total Likes
Form were sent.
Views
Replies
Total Likes