Copy link to clipboard
Copied
I have a checklist that has several questions and that the final part is the rating (Commendable 100%, Trained 99%-80%, Practiced 79%-65%, or Untrained 64% or less) based on the overall score. The problem is that if the value changes, the rating doesn't change along with it (86% will still show commendable for example). Also, there are two check boxes that if either one is checked, then the score is automatically set to 0% and rating to "Untrained (Critical)."
var score = this.getField("949 Score").value;
if (score == 1) event.value = "Commendable";
else if (score <= .99 && score >= .80) event.value = "Trained";
else if (score <= .79 && score >= .65) event.value = "Practiced";
else if (score <= .64) event.value = "Untrained";
if (this.getField("949 Q1 Critical").value == "Yes") event.value = "Untrained (Critical)";
if (this.getField("949 Q4 Critical").value == "Yes") event.value = "Untrained (Critical)";
Did you check the field calculation order, as I've recommended?
Copy link to clipboard
Copied
Is the score field also calculated automatically? If so, then you need to check the field calculation order and make sure that this field is after the score field in that list.
Copy link to clipboard
Copied
Yes it's also calculated automatically. The score calculates just fine but the rating just won't commit to what the score says.
Copy link to clipboard
Copied
Did you check the field calculation order, as I've recommended?
Copy link to clipboard
Copied
are you talking about tab order?
Copy link to clipboard
Copied
Set Calculation Order Acrobat DC
It's different for other versions of Acrobat
Copy link to clipboard
Copied
Thank you! Works like a charm now. Try67 thank you as well for suggestion to begin with.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now