Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeremy - 21 Nov 2006 16:29 GMT
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.
andrew_s - 21 Nov 2006 18:18 GMT
This may help provide an answer.

http://www.xml.com/pub/a/2003/10/29/infopath.html
and here.

http://msdn.microsoft.com/msdnmag/issues/04/06/XMLFiles/

Sorry, don't have any specifics, though I imagine what you're looking for
requires accessing the DOM, selecting a single node for the item you want to
update, and updating the item based on your previously calculated value.  
This would most likely happen in the OnAfterChange event of the control with
the original total.

cheers,
Andrew

> 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
[quoted text clipped - 23 lines]
> Does no one want to add to rows together from diffrent repeating tables?
> Seems odd.
S.Y.M. Wong-A-Ton - 22 Nov 2006 05:55 GMT
> 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.net/infopath2003/article.php?t=avg-function-in
fopath&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

> 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
[quoted text clipped - 23 lines]
> Does no one want to add to rows together from diffrent repeating tables?
> Seems odd.
Jeremy - 22 Nov 2006 19:04 GMT
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.

> > Is this so easy no one wants to help or can this really not be done.
>
[quoted text clipped - 70 lines]
> > Does no one want to add to rows together from diffrent repeating tables?
> > Seems odd.
S.Y.M. Wong-A-Ton - 23 Nov 2006 05:08 GMT
Please do! I'm sure it will help others. Thanks.
---
S.Y.M. Wong-A-Ton

> 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
[quoted text clipped - 80 lines]
> > > Does no one want to add to rows together from diffrent repeating tables?
> > > Seems odd.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.