Calculate drop-down lists values - InfoPath Dev
in

InfoPath Dev

Calculate drop-down lists values

Last post 05-23-2013 11:39 AM by ip2010newb. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-22-2013 09:46 AM

    Calculate drop-down lists values

    Hello. I have a form designed in InfoPath 2010, but I am having trouble with the calculation of fields.

    I have a series of drop-down lists that each contain 2 number values and a place holder (n/a) with no value. One value is always zero and the other is either 1,5 or 10 based on the row criteria.

    After the drop-down lists are selected there is a button to click that will calculate and display the "Total Points" and "Total Possible Points" fields.

    I'm able to use the sum function to display the "Total Points" field, but can't figure out how to calculate and display the "Total Possible Points".

    For the "Total Possible Points", each drop-down list that has a selection, it should sum the largest number (if zero is selected it should use the largest number) to obtain the "Total Possible Points". If the drop-down list is still n/a, it should ignore that field.

    I've includes an example below if anyone has any ideas. Thanks!

    Drop-down lists                                  (Total points example)            (Total Points Possible example)

    Row 1: |10| 10 |n/a| 0  |10|             ( 30)                                        (40)
    Row 2: |5  | 0   | 5   |n/a| 0 |             (10)                                         (20)
    Row 3: |1  | 0   |n/a|n/a| 1 |             ( 2 )                                         ( 3 )

     

    Total Points: 32
    Total Possible Points: 63

  • 05-23-2013 11:39 AM In reply to

    Re: Calculate drop-down lists values

    In case anyone comes across a similar scenario, the following is how I was able to accomplish. There is probably a more efficient way, but this is what I came up with...

    I created a temp hidden field for each drop-down list field.

    Then created a rule for each time the drop-down was changed to update the temp hidden field with the row value and a second rule to set that value back to zero if the field was changed back to blank (n/a).

    Then sum all the temp fields to give the "total possbile points" when the calculate button is clicked.

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