This content has been marked as final.
Show 3 replies

1. Re: I have the following formula in a form "this.getField("Thickness")/Math.cos(this.getField("TransducerAngle")). I am trying to calculate T/cosine(X degrees) where T is the Thickness and X is the Angle. this is my best effort at it but it is not worki
Joel_Geraci Jan 4, 2017 12:22 PM (in response to terrym38714975)You're only getting the field object, not the value of the field. Try..
this.getField("Thickness").value/Math.cos(this.getField("TransducerAngle").value)

2. Re: I have the following formula in a form "this.getField("Thickness")/Math.cos(this.getField("TransducerAngle")). I am trying to calculate T/cosine(X degrees) where T is the Thickness and X is the Angle. this is my best effort at it but it is not worki
terrym38714975 Jan 4, 2017 12:30 PM (in response to Joel_Geraci)Joel
Thanks for your reply I tried it but it is not returning a value.

3. Re: I have the following formula in a form "this.getField("Thickness")/Math.cos(this.getField("TransducerAngle")). I am trying to calculate T/cosine(X degrees) where T is the Thickness and X is the Angle. this is my best effort at it but it is not worki
George_Johnson Jan 4, 2017 1:49 PM (in response to terrym38714975)You will need to correctly convert the value in degrees to radians to use the Math.cos method. Also, check the JavaScript console (Ctrl + J) to see if any error are reported. Finally, since the denominator could conceivably be zero (or very close), you should not perform the division if it is and set the field value to something else, perhaps blank.