Copy link to clipboard
Copied
I have a text field "Overall Performance" that needs to auto populate one of 3 possible words, based on a score number in another text field "Total Score". The "Total Score" field on page 1 is already set to display the number from the same field on page 12 by having both boxes named the same. The "Total Score" field on page 12 is set to calculate a sum and multiply it by 0.01. On page 1, the "Overall Performance" box should display one of the following words based on the "Total Score" number range:
Total Score = 2.50 to 3.00, Overall Performance = Exceptional
Total Score = 1.50 to 2.49, Overall Performance = Successful
Total Score = 0.00 to 1.49, Overall Performance = Unsuccessful
I need these words to auto-populate into that field and not be a user-selected field, like a drop down. I've been searching for how to do this and have seen other solutions using some coding in the validation script box, but I unfortunately just don't know or understand enough about the coding to figure out how to get it to work for this particular need. Hoping someone can help me out with this!
Enter the following custom calculation script in the Overall Performance field:
var total=this.getField("Total Score").value;
if(total <= 1.49)
{event.value="Unsuccessful"}
else
if(total > 1.49 && total <= 2.49)
{event.value="Successful"}
else
{event.value="Exceptional"}
Copy link to clipboard
Copied
Enter the following custom calculation script in the Overall Performance field:
var total=this.getField("Total Score").value;
if(total <= 1.49)
{event.value="Unsuccessful"}
else
if(total > 1.49 && total <= 2.49)
{event.value="Successful"}
else
{event.value="Exceptional"}
Copy link to clipboard
Copied
Thank you SO much! I tested it in all three ranges and it worked perfectly!