I'm trying to create basic calculations in a form that I am creating in LiveCycle Designer. Has anyone does this, and can you please give me some help? I don't understand the instructions in the Help feature or the book that I have. Here is what I am trying to do:
Text Field A 100 (manual entry)
Text Field B 75 (manual entry)
Text Field C 25 (Result of calculation of A - B = C)
Then:
Text Field D 2 (manual entry)
Text Field E 50 (Result of calculation of C X D = E)
I prefer to use Javascript so on the Calculate event of the C field you would use this command:
this.rawValue = FieldA.rawValue -Field B.rawValue
Then on E Field's calculate event you woudl use this command:
this.rawValue = FieldC.rawValue * FieldD.rawValue
If you woudl prefer to use FormCalc you woudl still use the Calculate event and on FieldC the command woudl be:
FieldA - FieldB
On the calculate of Field E
FieldC * FieldD
Hope that helps
paul
Okay, Paul, I have another question... I'm not even sure that it is possible.
Do you know how to force a positive result? Here is my example of what I am trying to say:
Value A: $1.00 minus Value B $1.10 equals -$0.10 (this comes out to a negative, but I need to just show it as a dollar amount not as a negative)
Not all situations will result in a negative number - so I need to always just show it as a dollar figure regardless of positive or negative.
Works fine for me ...here is a sample ...the code is on the calculate of the total field. Oh ....and make sure your fields are numeric.
Paul
North America
Europe, Middle East and Africa
Asia Pacific