Prepare Form - calculation result to generate assigned category via text

New Here ,
Nov 19, 2021 Nov 19, 2021

Copy link to clipboard

Copied

Hi Everyone,

I'm working on a file with calculations. I have the calculation set to calculate the overall score from the 4 numbered boxes to the left. Depending on the overall score, I would like the Assigned Category section to autopopulate the corresponding category (i.e., if the score is 2.5, the assigned category should auto populate the text 'Key Performer'). I've attached a screenshot to help with my explanation. Does anyone know how to achieve this result? I have not been able to find any resources online specific to my situation. Thank you!

Calculation.png

 

\\

 

TOPICS
How to , PDF forms , Windows

Views

43

Likes

Translate

Translate

Report

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

correct answers 1 Correct answer

Adobe Community Professional , Nov 19, 2021 Nov 19, 2021

As the custom calculation script of the text field you can enter something like this:

 

var score = Number(this.getField("Score").valueAsString);

if (score>=2.5 && score<5) event.value = "Key Performer";

else if (score>=5) event.value = "Star";

 

etc.

Likes

Translate

Translate
Adobe Community Professional ,
Nov 19, 2021 Nov 19, 2021

Copy link to clipboard

Copied

As the custom calculation script of the text field you can enter something like this:

 

var score = Number(this.getField("Score").valueAsString);

if (score>=2.5 && score<5) event.value = "Key Performer";

else if (score>=5) event.value = "Star";

 

etc.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

Thank you very much for your help try67! I was able to get this to work based on your feedback!

I did have one additional question I'm hoping you can help with - I want the Assigned Category to populate, but only once each of the fields have been selected. For instance, the Assigned Category section will populate only if each of the four drop down fields have been chosen by the user.

 

Looking forward to your feedback.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

LATEST

Do these fields have a "neutral" default value, like "Select" or even just an empty string?

Likes

Translate

Translate

Report

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