
1. Re: Need some help with converting an excel formula.
George_Johnson Mar 31, 2012 11:25 AM (in response to BMarshall9)The JavaScript that you would place in Calculate event of a field would be something like this:
// Custom Calculate script for text field (function () { // Get the field value of C11, as a number var v = +getField("C11").value; // Perform the calculation, round down, and set this field's value event.value = Math.floor(v / 2  5); })();
Replace "C11" with the actual name of the field if it's different.
If you give fields the same name, they will automatically get the same value.

2. Re: Need some help with converting an excel formula.
BMarshall9 Apr 1, 2012 9:03 PM (in response to George_Johnson)1 person found this helpfulOne more question I think. How do I save and distribute this form so that my fellow Players in this campaign can fill it out and save the filled out form on their computer if they are only using reader 9? ANd finally....what would I add to that equation to aloow it to output a "0" if the result of the formula is zero or less?

3. Re: Need some help with converting an excel formula.
George_Johnson Apr 1, 2012 11:27 PM (in response to BMarshall9)1 person found this helpfulYou will need to Readerenable the document. If you have Acrobat 9, select: Advanced > Extend Features in Adobe Reader. If Acrobat 10, select: File > Save As > Reader Extended PDF > Enable Additional Features
To set the value of the field to zero of zero or less, the script would be:
// Custom Calculate script for text field (function () { // Get the field value of C11, as a number var v = +getField("C11").value; // Perform the calculation, round down, and set this field's value var val = Math.floor(v / 2  5); event.value = val > 0 ? val : 0; })();

4. Re: Need some help with converting an excel formula.
BMarshall9 Apr 2, 2012 4:18 PM (in response to George_Johnson)1 person found this helpfulAwesome, Thank you Very Much for the help!!