Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Error: Accessor TotalStipPmnt Unknown

Avatar

Level 2

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?

Thank you.

Ms. Shayne Ortmeier

1 Accepted Solution

Avatar

Correct answer by
Level 10

No problem,

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,

Niall

View solution in original post

6 Replies

Avatar

Level 10

Hi,

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.

Good luck,

Niall

Avatar

Level 2

Yes, the subtotals are ALL in different subforms.  I'm just learning how to do this and am not sure what SOM means....

Avatar

Correct answer by
Level 10

No problem,

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,

Niall

Avatar

Level 2

THANK YOU!!!  That's perfect!!!

Also, thank you for taking the time to explain SOM to me...your explanation is WAY better than the book's explanation!

My form is complete!!!

Avatar

Level 10

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.

Avatar

Level 2

Thanks!

Ms. Shayne R. Ortmeier

Professional Assistant

Curriculum, Instruction & Innovation Team

Department of Education

301 Centennial Mall South, 6th Floor

Lincoln, NE 68509

Direct Line: 402.471.0511

Fax: 402.471.0117

Signature Strengths

  • Restorative * Significance * Context * Responsibility * Focus *