sum repeating section base on dropdown choice


Badge +1

I have a repeating section with a value filed and what I would like to to is to calculate the total depending on the drop down menu choice

eg

DateChoice (drop down menu)
Value
11/06/2015Flight£10.00
11/06/2015Taxi£10.00
11/06/2015Flight£20.00

Choice
Total
Flight£30.00
Taxi£10.00
Grand total£40.00

Is this possible?


4 replies

Badge +9

For each value of Choice You have to add a calculated value controle to repeating section named e.g. val_flight and val_taxi with formula If(equals(Choice,'Flight'),Value,0) and If(equals(Choice,'Taxi'),Value,0).

Under Repeating section add for each value of Choice a calculated value control with formula e.g. sum(val_flight).

If You would not show the extra columns in repeating section You can set it to invisible using css.

Kind regards

Manfred

Badge +1

Perfect.  Thanks for your help.

Badge

Hi,

Manfred Lauer

What if the amount of choices is very large? what would be the best method of getting this functionality.

In this example, the choices are only flight and taxi, but what I am working on, there are more than 100's of choices. I am looking to show something similar, but only the choices that the user picks show up in the final total.

Any help would be greatly appreciated.

Badge +8

Did you ever figure out a way to do this? I'm looking to do the same thing, with about 80 choices. 

Reply