Using Designer 8.2
I am attempting to add five groups of numbers together for a grand total. I have five sub totals, all in formcalc, which I want to add together but everytime I receive this message on the grand total. Every cell is properly identified and the subtotals work perfectly when I use them but I just can't get the grand total to calculate.
The first Subtotal is TotalStipPmnt
The second is TotalMealReimb
The third is TotalMileageReimb
The fourth is TotalMiscReimb
The fifth is Lodging
The grand total is TotalReim
The formula that I have is: Sum(TotalStipPmnt + TotalMealReimb + TotalMileageReimb + TotalMiscReimb + Lodging)
Can someone please assist me?
Ms. Shayne Ortmeier
Check the help file. The Sum function separates objects with a comma "," so that the formula would look like this:
Sum(TotalStipPmnt, TotalMealReimb, TotalMileageReimb, TotalMiscReimb, Lodging)
Also check that you have set the language to FormCalc and that if objects are in different subofrms or different pages, that you include the full SOM reference.
SOM stands for the script object model and it is how you reference objects (like textFields and numericFields) in a form.
It makes it easier when you are scripting to give pages; subforms; and objects a unique name as you generate them.
If we assume that TotalStipPmnt was on page1 in subform "stip", TotalMealReimb was also on page 1 in a subform "Food". TotalMileageReimb and TotalMiscReimb are on page2 in a subform "otherCosts" and Lodging is on page3 in subform "sleep".
Now the other thing to bear in mind is the page that the total object is relative to the other objects. Let's say it is on page3, same as Lodging, but in a different subform.
Sum(page1.stip.TotalStipPmnt, page1.Food.TotalMealReimb, page2.otherCosts.TotalMileageReimb, page2.otherCosts.TotalMiscReimb, sleep.Lodging)
Basically you build up the reference for the objects in the calculation. Because the calculation and Lodging were on the same page, you did not need to include page3. Each component of the reference is separated by a full stop.
Hope that helps,
The easiest way to do this is to navigate to where you can see the field you want to reference, click in the script editor where you want the field reference to go and then holding down the CTRL key mouse over the field you want (the mouse cursor should change to a "V") and click on it.
Ms. Shayne R. Ortmeier
Curriculum, Instruction & Innovation Team
Department of Education
301 Centennial Mall South, 6th Floor
Lincoln, NE 68509
Direct Line: 402.471.0511
Restorative * Significance * Context * Responsibility * Focus *
Europe, Middle East and Africa