Please help. I have run into a stumbling block, the use of exponents or raise to the power of operation inside fillable forms. I'm using Adobe Acrobat DC Pro. As an example, 2^3 returns an answer of 1 vs. 8. I have also attempted to use "**" and "Math.pow" without any luck. Does anyone know how to correct/fix/modify so that I can complete my form. This is my last hurdle and a required one. Thank you for your help!
Math.pow() is the correct function
var x = Math.pow(2,3);
Please no more emails
Hi Everyone. Thank you for the responses. However, when I try using Math.pow(x,x) the formula is not working. Following is the behind the scenes. I'm sure it's a simple mistake but...
start out with
event.value = Math.pow(2,3);
You can read more about form scripting here:
Please note, I have tried placing the formula in both the Simplified and Custom calculation fields. No luck!
Did you try out the test code I suggested?
Here's an article on performing simple calculations:
Yes, I tried the exact code you suggested to no avail. Thank you for the articles. I just tried the following:
event.value = Math.pow(this.getField("Payment_S2").value,this.getField("Months"));
The result was NaN.
The formula breaks down when a value needs to be raised to the power of x, in this case # of months.
In your script you forgot to add '.value' to "Months" field.
You're brilliant! It works! Thank you for perservering with me.
Your screen shot is too small to read, unfortunately. But you need to not just show us the code, but also tell us what you WANT to happen and what ACTUALLY happens. If you look at your code, we may be able to know what it will do, but we certainly can't guess what you are wanting if it's something different...