on 03-17-2014 6:24 PM
Hello Experts
can i know how to calculate sum of fields in the adobe form. I have few fields to be summed in total field.
Regards
Hello Surendra,
Suppose you are having 4 fields and the 4th field is the TOTAL field.
Write the below Javascript on the Initialize event of TOTAL field as shown below.
Remember that if you use just "+" sign without Number() or ParseInt() function it acts like String Concatenation.
this.rawvalue = Number( this.parent.field1.rawvalue ) +
Number( this.parent.field2.rawvalue ) +
Number( this.parent.field3.rawvalue ) ;
You can also write is as shown below.
this.rawvalue = parseInt( this.parent.field1.rawvalue ) +
parseInt( this.parent.field2.rawvalue ) +
parseInt( this.parent.field3.rawvalue ) ;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use java script to calculate the sum.
You can use script like this in initialization event of the field where you want to show the total.
this.rawValue = root.node.field1.rawValue+root.node.field2.rawValue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.