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 / December 2004

Tip: Looking for answers? Try searching our database.

Survey Form: calculations - adding columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 03 Nov 2004 23:20 GMT
Hi,

I'm new to InfoPath and was wondering if there is a more simplified
way to add columns.  For example, I have a repeating table of survey
questions that has a drop-down box with ratings (0-N/A to 5-Best).
The result would be a "total" field displaying the score and a box for
the "average" (extracting any zeros from the average calculations
since zeros are for N/A).

I could add a function: sum(field1)+(field2)+so on... but this isn't
very flexible if there are a lot data.  I placed the ratings field
into a Group hoping that I could just use: sum(ratings), but found out
that you cannot calculate a Group since it doesn't "technically" have
data.  How come the program won't let you just add what's inside the
folder/group?

Please advise.
Thank you in advance.

Jeff
Andrew Watt [MVP - InfoPath] - 09 Nov 2004 12:49 GMT
>Hi,
>
[quoted text clipped - 16 lines]
>
>Jeff

Jeff,

I am becoming a little muddled by your description, so will describe a
simple scenario which you can hopefully apply to your own situation.

Assume a repeating table with three columns and you want to sum column
3.

This is one way to do it.

Add an expression box control outside the repeating table.

Click the fx button.

Select the Insert Field or Group button and click on the field (not
the group) for the column.

That will give you something like

my:group1/my:group2/my:field3

Check the edit XPath check box. Edit the XPath as follows:

sum(my:group1/my:group2/my:field3)

The expression box should then contain the sum of the fields in column
3.

Does that help you get to a solution?

Andrew Watt
MVP - InfoPath
Cate - 30 Dec 2004 14:37 GMT
And is there a way to take this one step further? I have two repeating tables
and have got the sum of column 3 from each table in two expression boxes. But
I need to add the total from each expression field together (basically a
subtotal and a subtotal to get a grand total).

Do I need to find a way to nest the both repeating tables and the subtotal
expression fields inside another table?
Thanks,

> >Hi,
> >
[quoted text clipped - 49 lines]
> Andrew Watt
> MVP - InfoPath

Rate this thread:






 
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.