Copy link to clipboard
Copied
So this might be a dumb and simple question but I am attempting to have a letter grade out put based on the results of a different box.
I have a text field that adds together two other fields on the form. (Lets call it Total point demerits) I need a different box (lets call it inspection grade) to out put a letter based on the data from box 1
If total point demerits is <= 10 then inspection grade should be AIf total point demerits is >= 11 && <= 20 then inspection grade should be B
If total point demerits is >= 21 && <= 40 then inspection grade should be C
Thank you for your help.
As the custom calculation script of "inspection grade" enter this code:
var points = Number(this.getField("Total point demerits").valueAsString);
if (points<=10) event.value = "A";
else if (points<=20) event.value = "B";
else if (points<=40) event.value = "C";
I wasn't sure what you wanted to do if the total is zero, or if the field is empty...
Copy link to clipboard
Copied
As the custom calculation script of "inspection grade" enter this code:
var points = Number(this.getField("Total point demerits").valueAsString);
if (points<=10) event.value = "A";
else if (points<=20) event.value = "B";
else if (points<=40) event.value = "C";
I wasn't sure what you wanted to do if the total is zero, or if the field is empty...