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
BedrockMission!

Learn More

View all

Sign in to view all badges

sum of fields nested within nested, repeating subforms

Avatar

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

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

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)