Formulating a Math Calculation in InfoPath - InfoPath Dev
in

InfoPath Dev

Formulating a Math Calculation in InfoPath

Last post 04-24-2012 09:58 AM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-23-2012 01:50 PM

    Formulating a Math Calculation in InfoPath

    I currently have an InfoPath 2010 form requirement which I'm having problems formulating a math calculation in a Repeating Table. The layout is as follows:

    1. Start of Impact                             Date & Time field

    2, End of Impact                              Date & Time field

    3, Total Impact Time (mins)              Single line of text field

    4. Number of Users Impacted           Single line of text field

    5. Percent of Impairment                  Single line of text field

     I would like to apply a rule with this logic:

    Number of Users Impacted * Time Impaired (difference between start of impact and end of impact) * (Percent of Impairment/100)

    This formula was being used but is not working properly:

    ~~=IF([CS Impact]=0,0,[Num of Users Impacted]*[xTime_Impacted]*([Percent of Impairment]/100)~~

    Can anyone tell me how to get these results?

                 

  • 04-24-2012 09:58 AM In reply to

    Re: Formulating a Math Calculation in InfoPath

    A date diff is not easy to do in InfoPath out of the box.  I believe you'll need to write custom code or use qRules for that functionality.  If you are just using total time then your formula will just look something like:

    totalField * numUsersField * (percentField/100)

    Hope this helps!

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

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