Hello,
I'm working on an evaluation form where the survey calculates a sum from a field within a loop and merge block.
First, the user enters the number (n) of items to start the loop and merge block, which will loop for n # of times.
Then, the loop and merge happens for that number of times (n). There is a field in that loop and merge block called "direct costs", so if n=5 they are entering the direct costs of 5 items.
After the loop and merge ends, I need to be able to show a sum of n, or the total direct costs.
I'm not sure if there's a function to sum up loop and merge values, and display them in a descriptive field. If I use a math operation: q://1_QID#/ChoiceTextEntryValue+q://2_QID#/ChoiceTextEntryValue+.....my max of 20 loop and merges, if someone enters 2 for n, the piped text returns an invalid expression due to all of the undefined values being used in that expression. The same goes for embedded data (although I'd like to avoid using embedded data, because it disables the ability to go back and edit entries preceding the embedded data in the survey flow)
Is this something I can even implement? I haven't been able to find a similar use case in the community questions...
Best answer by SurajK
View original