Skip navigation
Currently Being Moderated

Error: Accessor TotalStipPmnt Unknown

Nov 30, 2009 2:15 PM

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

 
Replies
  • Currently Being Moderated
    Nov 30, 2009 2:20 PM   in reply to SRenae

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 30, 2009 2:45 PM   in reply to SRenae

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2009 11:32 AM   in reply to SRenae

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points