Highlighted

sum of fields nested within nested, repeating subforms

Avatar

Guest

25-09-2008

Hi



Now it's my turn to put in a question to this forum.

What I really like to do is somthing like this:

var fields = xfa.resolveNodes("sub_Foranstaltning[*].sub_aarSkema [*].sub_SkemaBund.fld_AarNettoUdgiftKommune");

var total = 0;

for (var i=0;i <= fields.length-1; i++) {

total = total + fields.item(i).rawValue;}

this.rawValue = total;



I have to sum a field from inside a subform witch is indside a repeating subform, witch is inside a repeating subform.

but can't seem to get the nested [*] to work, how do you do it



Elin C

Replies

Highlighted

pguerett

25-09-2008

There are simply FormCalc commands that allow for this otherwise you are writing some complex javacode to loop through a series of nodes.



In FormCalc you can say Sum(sub_Foranstaltning[*].sub_aarSkema [*].sub_SkemaBund.fld_AarNettoUdgiftKommune)