Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Need Help Creating Custom Calculation Script Please

$
0
0

Untitled-1.jpg

Hello,

 

I am in desperate need of a custom script here if anyone knows how to do it. I essentially want the percentage field to automatically fill in based on the fraction, rounded to the nearest integer, show "0" if F2 is "0", and not display "NaN" before it's filled out. I also do not want the error message to pop up "The value entered does not match the format of the field [ P ]"

 

F1 and F2 will always be a whole number between 0-9, and P will always be a whole number between 0-100.

 

I've been using (F1/F2)*100 as a Simplified Field Notation, but it keeps showing decimals and displaying "NaN" when nothing has been entered in F1 and F2. Any gurus out there that could help me? I'd really appreciate it. Thanks


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>