Calculating A Form's Percentage Complete - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculating A Form's Percentage Complete

Last post 10-26-2009 04:22 AM by ErnestoM. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-25-2009 08:42 PM

    Calculating A Form's Percentage Complete

    I want my form to be able to calculate the level to which a user has completed upon submit.  For example, if there are 10 text fields, and they complete 8, leaving 2 blank, I'd like a node to calculate the form has been submitted 80% complete.  To hold the calculated values needed, I've created separate nodes to hold "total form nodes", "form nodes completed", and then "percent complete".  However, I don't know what formula to put into any of these to make it work.  I've tried using the "Count" function, but I haven't gotten it to work yet.

     Can anyone advise on what the formulas might be to do this?

  • 10-25-2009 10:46 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Calculating A Form's Percentage Complete

    Here are the default values for each field,

    Total form nodes: count(../my:field1 | ../my:field2 | ../my:field3 | ../my:field4 | ../my:field5 | ../my:field6 | ../my:field7 | ../my:field8 | ../my:field9 | ../my:field10)

    Form nodes completed: count(../my:field1[. = ""] | ../my:field2[. = ""] | ../my:field3[. = ""] | ../my:field4[. = ""] | ../my:field5[. = ""] | ../my:field6[. = ""] | ../my:field7[. = ""] | ../my:field8[. = ""] | ../my:field9[. = ""] | ../my:field10[. = ""])

    Percentage complete: (100 * count(../my:field1[. = ""] | ../my:field2[. = ""] | ../my:field3[. = ""] | ../my:field4[. = ""] | ../my:field5[. = ""] | ../my:field6[. = ""] | ../my:field7[. = ""] | ../my:field8[. = ""] | ../my:field9[. = ""] | ../my:field10[. = ""])) div ../my:Total

  • 10-26-2009 04:22 AM In reply to

    Re: Calculating A Form's Percentage Complete

    Please see http://www.infopathdev.com/forums/p/13042/46146.aspx

     

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.