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

If Statment

JJayzon1
Registered: Mar 2 2009
Posts: 9

In one of my fields I want it to calculate the sum of four other fields and if that sum is less then 25 I want it to return a value of 10 and if it is grater than 25 I want a value of 0 returned can anyone help?

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can declare a variable to hold the sum of the fields, compute the sum and then use an 'if then' statement to test the value of the sum and set the value accordingly.

// get the sum of the fieldsvar mySum = Sum(field0, field1, field2, ... , fieldn)// test the value of sumif (mySum < 25) then// less than 2510else// not less than 250endif

You might want to read and view the material in the Learning Center to learn more about FormCalc, LiveCycel Designer, JavaScript, etc.

George Kaiser