Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

sum of fields nested within nested, repeating subforms

Not applicable
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
1 Reply
pguerett
Level 10
Level 10
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)