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 / May 2005

Tip: Looking for answers? Try searching our database.

How to add values found on optional sections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NathanDW - 15 May 2005 07:09 GMT
I have an invoice form which allows me to select the types of billing I need
for a particular invoice; example: I have four "optional sections": Items
billed by hour, items billed by quote, itemized expences, and misc. I can
select 1, none, all, etc. of these and enter several lines of values useing
repeating tables. Each optional section has a total. At the bottom of my
invoice form there is a text box which value is a function that adds the
totals from each optional section. If all the sections are not active or
created then the value returned is "NAN". I am assuming that unless you
"insert" a section the objects associated with that section are not created
so when the function tries to add the totals it cannot find them and the
function fails. What I think I need is a functions that tests to see if the
desired Section/section total exsists and then adds it to the total if it
does. I have used VBA for word and excel but can't figure it out for
infoPath.

Please Help,
Nathan Winder
Alex [MSFT] - 15 May 2005 22:45 GMT
Nathan,

Try using regular (non-optional) sections along with conditional
formatting for hiding them: this way, each of your sections will be in
the XML, so InfoPath won't give you NaN, instead using 0 for their value
if they are undefined.

Good luck,
Alex @ Microsoft

-----Original Message-----
From: NathanDW [mailto:NathanDW@discussions.microsoft.com]
Posted At: Saturday, May 14, 2005 11:09 PM
Posted To: microsoft.public.infopath
Conversation: How to add values found on optional sections
Subject: How to add values found on optional sections

I have an invoice form which allows me to select the types of billing I
need
for a particular invoice; example: I have four "optional sections":
Items
billed by hour, items billed by quote, itemized expences, and misc. I
can
select 1, none, all, etc. of these and enter several lines of values
useing
repeating tables. Each optional section has a total. At the bottom of my

invoice form there is a text box which value is a function that adds the

totals from each optional section. If all the sections are not active or

created then the value returned is "NAN". I am assuming that unless you
"insert" a section the objects associated with that section are not
created
so when the function tries to add the totals it cannot find them and the

function fails. What I think I need is a functions that tests to see if
the
desired Section/section total exsists and then adds it to the total if
it
does. I have used VBA for word and excel but can't figure it out for
infoPath.

Please Help,
Nathan Winder
NathanDW - 16 May 2005 07:55 GMT
" conditional formatting for hiding them " ?
Alex [MSFT] - 16 May 2005 16:09 GMT
Set up conditional formatting for each to say something like "if
showSection1 is 0 then hide this section". Then create a button with a
rule that would toggle showSection1.

If you need further a reference to learn conditional formatting and
rules, use InfoPath hands-on training labs:

http://msdn.microsoft.com/office/understanding/infopath/training/default
.aspx

Good luck,
Alex @ Microsoft

-----Original Message-----
From: NathanDW [mailto:NathanDW@discussions.microsoft.com]
Posted At: Sunday, May 15, 2005 11:56 PM
Posted To: microsoft.public.infopath
Conversation: How to add values found on optional sections
Subject: Re: How to add values found on optional sections

" conditional formatting for hiding them " ?
NathanDW - 16 May 2005 18:58 GMT
Thank you,
That did the trick, I used check boxes and conditional formating to control
section display. Now to make it absolutely perfect is there a setting to have
the check boxes not display when the form is printed. It is not vital but
will clean up the printed form a bit.

Thank you very much for your help,
Nathan Winder
NathanDW - 16 May 2005 19:08 GMT
I just figured out the answer to my previous question "hidding the check
boxes" I just create a custome print view that doesnt have the check boxes
 
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.