Sum dropdown value - InfoPath Dev
in

InfoPath Dev

Sum dropdown value

Last post 11-03-2014 12:55 AM by donstephen. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-30-2014 10:36 AM

    Sum dropdown value

    I have a form that I am doing 2 calculations on based on selections of multiple dropdowns.

    What I need is a way to sum the "possible" total of the drop downs.

    I already hear people saying "You know what the total will be"

    In this case I won’t, I need to sum the values associated to all the Yes's and not the N/A, example

    Field1 Yes=1 No=0 N/A=""

    Field2 Yes=5 No=0 N/A=""

    Possible total could be 0, 1, 5 or 6 depending on what fields get marked N/A

    I have a sum that works great based on the actual selection but not the potential selection.

    Another way to look at it would be

    If field1<>N/A and field2=N/A potential total = 1

    If field1<>N/A and field2<>N/A potential total = 6

    If field1=N/A and field2<>N/A potential total = 5

    Thank you.

     

    In doing more digging I think I can pull this off if I can reference an item in the dropdown specifically.

    So in dropdown 1 (GI_1) there are 3 options

    Value    Display Name

    “”          N/A

    1          Yes

    0          No

    Is there a way to do something like

    my:PartentObject/my:GI_1[2] <-index 2?

    I have tried many variations and always get a reference to my:GI_1 not the options within it.

    If I can get the options in GI_1 I can make all of this work

     

  • 11-03-2014 12:55 AM In reply to

    Hi Tstellman,

    Are you able to work with repeating tables with default values? This way you could easily sum up all the values of a specific column based on the selected answer from the corresponding  column. I imagine you formula would look similar to this: sum(YesValue[DropDown = "Yes"]) where YesValue is the value of Yes and the DropDown Is the dropdown with yes or no (you could also use option buttons or check boxes for yes/no or Boolean values). I hope this makes sense.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.