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 / July 2006

Tip: Looking for answers? Try searching our database.

Expression box vs. text box for calculations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KLaw - 14 Jul 2006 16:31 GMT
I have a form for Purchase Orders and I have a repeating table with items to
be ordered.  I would like to have an order total and have read every thread
about doing this.  My dilemma is that in order to calculate the total
correctly, it seems that I need to use an expression box, but I want to store
the calculated value in my database; therefore it seems that I need to have
the total in a text box.  The problem with a text box is that I can't seem to
get the calculation to work (I get a binding error that says "You have chosen
to bind a non-repeating control to a repeating field or group...".  Then it
will only display the first item's extended cost instead of the desired
sum(@ExtendedCost).  What am I doing wrong?  Anyone?
Greg Collins [InfoPath MVP] - 17 Jul 2006 19:06 GMT
The error should give indication of what you need to do.

You have your field in a repeating group, yet on the form, you are placing the field by itself (not in a repeating group). Since it's not repeating in the view, it can only display one value (which in this case is the first value). To fix the issue, either make the group not repeating (probably not an option) or place the field in a repeating section/table in the view.

As a side note, since you want to store the calculated value, you definitely want text box and not expression box.

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )

KLaw - 19 Jul 2006 20:16 GMT
Thanks - it's always the obvious that I overlook!

> The error should give indication of what you need to do.
>
> You have your field in a repeating group, yet on the form, you are placing the field by itself (not in a repeating group). Since it's not repeating in the view, it can only display one value (which in this case is the first value). To fix the issue, either make the group not repeating (probably not an option) or place the field in a repeating section/table in the view.
>
> As a side note, since you want to store the calculated value, you definitely want text box and not expression box.
 
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.