Hello,
I have a request to set a calculated field using conditional logic and loop merge fields. Here is what I'm trying to accomplish with Javascript, and want to know if it is possible. I need to avoid using embedded data because it prohibits the user from going back in the form.
I'm trying to set a field in a survey to a field that is summed from a loop and merge section, if another condition is met within that loop and merge.
A conceptual look at what i'm trying to do, I have not tried to figure out what it would look like in javascript yet:
--------
Total direct costs = 0;
For (int i=0; i < 20 (my max loops); i++)
If (getSelectedAnswerValue = "Funded" in that loop merge round) {
Total direct costs += field that needs to be summed in loop and merge
Set descriptive field in survey to total direct costs variable
--------
Can something like this be done? Can I loop through loop and merge data and sum a field based off of a condition that is met within that loop and merge? Something like what piped text does, but I'm not sure if I can apply logic to piped text?
Any advice is greatly appreciated.
Thanks,
NAT
Calculating a descriptive field based off conditional loop merge
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
