Solved

Sum Repeating Section Values in Responsive Designer

  • 23 October 2019
  • 2 replies
  • 274 views

Badge +3

I am trying to create a form in the Responsive Designer with a repeating section and a total cost field. In the repeating section I have a numeric field. I would like all the numeric fields to be totaled in the total cost field.

 

In the responsive designer it seems this is not an option to get fields within the repeating section to sum().

 

Has anyone else figured out how to accomplish this?

icon

Best answer by v-tmasenko 23 October 2019, 22:32

View original

2 replies

Userlevel 3
Badge +9
Calculations must be done in variable definitions always.

So a sample solution would be:
1) Create a decimal variable CostTotal with the definition:
sum(Form.RepeatingSectionName.Cost)
2) Create a Form rule with the definition:
Apply to: Form
Name: set TotalCost
if CostTotal does not equal 0
then TotalCost Value CostTotal

Note: Use the blue "insert" tab to select the CostTotal variable in both parts of the "if" rule
Badge +5
This worked great, thank you!

Reply