Please help, Sum by row of 2 repeating tables. Not by colume. Can

J

Jeremy

I have spent hours looking for a simple awnser can you take to total from one
Repeating Tables ROW and sum it to another Repeating Tables ROW at the same
row place? I have 2 diffrent repeating tables and need to subtotal by row
both tables together.

Project 1 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Project 2 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Sum of Phase 1 + Phase 1
Sum of Phase 2 + Phase 2

Is this so easy no one wants to help or can this really not be done. In
excel it would be easy, but with a repeating table the rows don't exist. Do I
have to use a Current() command?

I have designed a 13 page Infopath form and am stuck on this one field.

Please help me out. I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

Does no one want to add to rows together from diffrent repeating tables?
Seems odd.
 
A

andrew_s

S

S.Y.M. Wong-A-Ton

Is this so easy no one wants to help or can this really not be done.

"Easy" is a relative term, i.e. what is easy for one person is not
necessarily easy for another. If your question is not being answered, it
generally means one of 3 things: 1. You haven't formulated it clearly enough
so that someone can help you quickly enough, 2. The people who regularly roam
this newsgroup answering questions in their spare time do not have time to
answer questions, or 3. Nobody knows the answer. Easy questions tend to get
answered fairly quickly. Tip: You can also post your question on the
infopathdev.com forum where more InfoPath MVPs hang around.
I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

I do not think you will find the answer to this question in a book, unless
you want to write code. Almost anything can be done through code, but not
everyone is a programmer. And you can solve this issue without code. :)
Does no one want to add to rows together from diffrent repeating tables?
Seems odd.

This is the first time - for as long as I have been in this newsgroup - that
this question has been asked. Either it is a "special" case or nobody has had
the courage to ask it before. :)

If your sum fields are fixed and not variable, that is, you do not have them
in a repeating group too, you can easily apply a trick I've used many times
and which is also used in this article
http://enterprise-solutions.swits.n...le.php?t=avg-function-infopath&c=infopath2003
to calculate the sum. You can add a helperField to your form and then set
rules on the fields in the repeating tables to set the value of the
helperField (see article). Then you can create rules on the helperField to
set the value of the sum fields using the values from the repeating group.
When calculating the sum, you have to use an XPath filter.

Example:
If the field for Phase 1 in the first repeating table is called Phase1First
and the field for Phase 1 in the second repeating table is called
Phase1Second, then the sum field for Phase 1 should get the value of

RepeatingGroup1[1]/Phase1First + RepeatingGroup2[1]/Phase1Second

Let me know if my explanation helped. If it didn't, I will convert your
scenario this weekend into a solution and post it up on my website.
 
J

Jeremy

I finally fixed the problem. Because I can so many fields I use in a
repeating section and table in many diffrent pages of my form all of these
fields that need to be summed are in the same repeating group. I have 30 or
40 fields in this group. By adding a new field in that group and creating a
basic 1 + 1 + 1... it adds the fields to gether without needing to set the
row to add.

When I am done with this form I will post it on my website for people to
look over and see what they think.

S.Y.M. Wong-A-Ton said:
Is this so easy no one wants to help or can this really not be done.

"Easy" is a relative term, i.e. what is easy for one person is not
necessarily easy for another. If your question is not being answered, it
generally means one of 3 things: 1. You haven't formulated it clearly enough
so that someone can help you quickly enough, 2. The people who regularly roam
this newsgroup answering questions in their spare time do not have time to
answer questions, or 3. Nobody knows the answer. Easy questions tend to get
answered fairly quickly. Tip: You can also post your question on the
infopathdev.com forum where more InfoPath MVPs hang around.
I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

I do not think you will find the answer to this question in a book, unless
you want to write code. Almost anything can be done through code, but not
everyone is a programmer. And you can solve this issue without code. :)
Does no one want to add to rows together from diffrent repeating tables?
Seems odd.

This is the first time - for as long as I have been in this newsgroup - that
this question has been asked. Either it is a "special" case or nobody has had
the courage to ask it before. :)

If your sum fields are fixed and not variable, that is, you do not have them
in a repeating group too, you can easily apply a trick I've used many times
and which is also used in this article
http://enterprise-solutions.swits.n...le.php?t=avg-function-infopath&c=infopath2003
to calculate the sum. You can add a helperField to your form and then set
rules on the fields in the repeating tables to set the value of the
helperField (see article). Then you can create rules on the helperField to
set the value of the sum fields using the values from the repeating group.
When calculating the sum, you have to use an XPath filter.

Example:
If the field for Phase 1 in the first repeating table is called Phase1First
and the field for Phase 1 in the second repeating table is called
Phase1Second, then the sum field for Phase 1 should get the value of

RepeatingGroup1[1]/Phase1First + RepeatingGroup2[1]/Phase1Second

Let me know if my explanation helped. If it didn't, I will convert your
scenario this weekend into a solution and post it up on my website.
---
S.Y.M. Wong-A-Ton


Jeremy said:
I have spent hours looking for a simple awnser can you take to total from one
Repeating Tables ROW and sum it to another Repeating Tables ROW at the same
row place? I have 2 diffrent repeating tables and need to subtotal by row
both tables together.

Project 1 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Project 2 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Sum of Phase 1 + Phase 1
Sum of Phase 2 + Phase 2

Is this so easy no one wants to help or can this really not be done. In
excel it would be easy, but with a repeating table the rows don't exist. Do I
have to use a Current() command?

I have designed a 13 page Infopath form and am stuck on this one field.

Please help me out. I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

Does no one want to add to rows together from diffrent repeating tables?
Seems odd.
 
S

S.Y.M. Wong-A-Ton

Please do! I'm sure it will help others. Thanks.
---
S.Y.M. Wong-A-Ton


Jeremy said:
I finally fixed the problem. Because I can so many fields I use in a
repeating section and table in many diffrent pages of my form all of these
fields that need to be summed are in the same repeating group. I have 30 or
40 fields in this group. By adding a new field in that group and creating a
basic 1 + 1 + 1... it adds the fields to gether without needing to set the
row to add.

When I am done with this form I will post it on my website for people to
look over and see what they think.

S.Y.M. Wong-A-Ton said:
Is this so easy no one wants to help or can this really not be done.

"Easy" is a relative term, i.e. what is easy for one person is not
necessarily easy for another. If your question is not being answered, it
generally means one of 3 things: 1. You haven't formulated it clearly enough
so that someone can help you quickly enough, 2. The people who regularly roam
this newsgroup answering questions in their spare time do not have time to
answer questions, or 3. Nobody knows the answer. Easy questions tend to get
answered fairly quickly. Tip: You can also post your question on the
infopathdev.com forum where more InfoPath MVPs hang around.
I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

I do not think you will find the answer to this question in a book, unless
you want to write code. Almost anything can be done through code, but not
everyone is a programmer. And you can solve this issue without code. :)
Does no one want to add to rows together from diffrent repeating tables?
Seems odd.

This is the first time - for as long as I have been in this newsgroup - that
this question has been asked. Either it is a "special" case or nobody has had
the courage to ask it before. :)

If your sum fields are fixed and not variable, that is, you do not have them
in a repeating group too, you can easily apply a trick I've used many times
and which is also used in this article
http://enterprise-solutions.swits.n...le.php?t=avg-function-infopath&c=infopath2003
to calculate the sum. You can add a helperField to your form and then set
rules on the fields in the repeating tables to set the value of the
helperField (see article). Then you can create rules on the helperField to
set the value of the sum fields using the values from the repeating group.
When calculating the sum, you have to use an XPath filter.

Example:
If the field for Phase 1 in the first repeating table is called Phase1First
and the field for Phase 1 in the second repeating table is called
Phase1Second, then the sum field for Phase 1 should get the value of

RepeatingGroup1[1]/Phase1First + RepeatingGroup2[1]/Phase1Second

Let me know if my explanation helped. If it didn't, I will convert your
scenario this weekend into a solution and post it up on my website.
---
S.Y.M. Wong-A-Ton


Jeremy said:
I have spent hours looking for a simple awnser can you take to total from one
Repeating Tables ROW and sum it to another Repeating Tables ROW at the same
row place? I have 2 diffrent repeating tables and need to subtotal by row
both tables together.

Project 1 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Project 2 (Repeating Table)
Phase 1 - Row 1
Phase 2 - Row 2

Sum of Phase 1 + Phase 1
Sum of Phase 2 + Phase 2

Is this so easy no one wants to help or can this really not be done. In
excel it would be easy, but with a repeating table the rows don't exist. Do I
have to use a Current() command?

I have designed a 13 page Infopath form and am stuck on this one field.

Please help me out. I'm tempted to go buy a book on it, but I can't even
find some hint of it on google or any form.

Does no one want to add to rows together from diffrent repeating tables?
Seems odd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top