# Looking for formula help!!

New Here ,
Feb 16, 2018 Feb 16, 2018

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

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

120

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Most Valuable Participant , Feb 16, 2018 Feb 16, 2018
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...

Likes

Most Valuable Participant ,
Feb 16, 2018 Feb 16, 2018

Copied

LATEST

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...

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more