These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Summing using FormCalc in LiveCycle Designer 8.1

nmara
Registered: Feb 4 2007
Posts: 102

User created a form in LiveCycle Designer 8.1 and when trying to sum up a few cells using formcalc gets the following message "Script failed (language is formcalc; context is xfa[0].form1[0].subform[0].Table3[0].Row4[0].ActTotal[0])
script=Sum(ActSalary,ActEre,ActOther) Error accessor 'ActSalary' is unknown
 
What is the issue and how can we possibly resolve it?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Are [b]ActSalary[/b] and [b]ActEre[/b] variables or field names?

The Sum() function is expecting a single string as input. This input is a list of SOM expressions. So the easy way to fix this is to simply enclose your list of field names in quotes like this:

Sum("ActSalary,ActEre,ActOther")

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

nmara
Registered: Feb 4 2007
Posts: 102
Tom,

Thanks so much. To answer your question I thought it was a variable name, but may be wrong. On the binding tab of the object pallete these "names" are tied to the cells. Would variables be easier than field names or visa versa??

I have added quotation marks, and now the error is gone, however the sum just stays at $0.00. I need to figure out why that is now. All the fields are numeric and the total field is set to calculate...Not sure what I am missing here.

Thanks again,

Nat