Adding Results from Optional Sections - InfoPath Dev
in

InfoPath Dev

Adding Results from Optional Sections

Last post 09-11-2006 11:44 AM by dlgross. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-12-2006 12:56 PM

    Adding Results from Optional Sections

    I have a Repeating Section that contains 5 repeating tables, 2 of which are optional. I am trying to create an expression that can correctly add together fields from the footers of each table, but it only seems to work when all of the tables have data. When I do not put data into the optional tables then my grand total formula just gives me 1#QNAN. How can I create a formula that correctly handles these optional fields?
    TIA
    Dean
    Dean
    Charlotte, NC
  • 07-13-2006 03:59 PM In reply to

    Re: Adding Results from Optional Sections

    Try this:

    Tools -> Form Options -> Treat blank values as zero
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-17-2006 05:53 AM In reply to

    Re: Adding Results from Optional Sections

    Thanks, but I already have that option checked. Any other ideas?
    Dean
    Charlotte, NC
  • 07-18-2006 09:27 AM In reply to

    Re: Adding Results from Optional Sections

    Sorry to insult your intelligence, Dean. :)

    This is a rather interesting problem, and I think I have solved it with this formula:

    concat("0", field1) + concat("0", field2)

    The problem was that the node wasn't blank, it just wasn't present. So, tacking a zero to the most significant digit will allow the nodes that are not present to simply be a 0 in the equation. I hope this helps!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 09-11-2006 11:44 AM In reply to

    Re: Adding Results from Optional Sections

    Matt, this works great when the values in the Optional sections are greater than 0 but fails when they are negative. Any idea how to modify this to work when field1 and/or field2 is less than 0?
    Dean
    Charlotte, NC
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.