I am building a brand new form in Forms 11.0.2106 using the new designer and am having an issue with a SUM calculation. The form is a Travel Authorization Form that has a table that fills in the GSA amounts for food and the submitter then selects which meals were covered that day by the travel policy and of those meals, which were provided by the event (thus they would not be reimbursed for them).
The "Amount" currency field has a calculation written that only includes the Breakfast GSA amount in the line total if "Breakfast" is checked in "Daily Meals" and "Breakfast" is NOT checked in "Covered by Event". When the SUM statement ONLY has the function for Breakfast then it works fine, as seen above where "Amount" is $15.00. Below is the calculation used.
=SUM(IF(TEXT(INDEX(Food_Estimation.Daily_Meals.Breakfast,ROW()))="TRUE",IF(TEXT(INDEX(Food_Estimation.Covered_By_Event.Breakfast,ROW()))="FALSE",INDEX(Food_Estimation.Breakfast_GSA,ROW()),0),0))
When the calculation is updated to include Lunch, it processes the Breakfast portion of the IF statement fine but then includes automatically without even checking it, as can be seen below where the "Amount" is now $35.00.
Below is the calculation that includes the IF statements for both Breakfast & Lunch.
=SUM(IF(TEXT(INDEX(Food_Estimation.Daily_Meals.Breakfast,ROW()))="TRUE",IF(TEXT(INDEX(Food_Estimation.Covered_By_Event.Breakfast,ROW()))="FALSE",INDEX(Food_Estimation.Breakfast_GSA,ROW()),0),0), IF(TEXT(INDEX(Food_Estimation.Daily_Meals.Lunch,ROW()))="TRUE",IF(TEXT(INDEX(Food_Estimation.Covered_By_Event.Lunch,ROW()))="FALSE",INDEX(Food_Estimation.Lunch_GSA,ROW()),0),0))
If I remove the Breakfast code and just use the Lunch code then it works fine with the Lunch checkboxes so I know each individual piece of the code is correct. I also tried removing the SUM part and using + but that produced the same results.
I know to work around this that I can write the values to other hidden fields or create a super complex nested IF statement to get this to work. This post is to see if anyone has gotten Forms to SUM different IF statements within the same calculation? Or is this a bug in the new forms designer? Or is this something that has never worked and there are no plans to ever have it work?