Quantcast
Channel: Adobe Community : Unanswered Discussions - General and cross-application scripting
Viewing all articles
Browse latest Browse all 84

Create a value in one field, based upon the percentage range in another field.

$
0
0

Good morning, forum folks!  I am trying to create a field which populates a score based on the percentage in another field.  To that end, I have a field which autocalculates a percent based upon two other fields.  I would like a third field which, for instance, rates less 75% as a 2 ... 75 - 85% as a 3 .. and greater than 85% as a 4.  I cannot figure out the syntax to make this happen, can any of you help?

 

For edification, my percentage field looks like:

//Rock Percentage Calculation – use Number Format “Percentage”

if (this.getField("RockTotalQ").value==0) {
    event.value = 0;
} else {
event.value = this.getField("RockComplQ").value/this.getField("RockTotalQ").value;
}

 

Thankyou.


Viewing all articles
Browse latest Browse all 84

Trending Articles



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