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!
\\
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.
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.
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.
Copy link to clipboard
Copied
Do these fields have a "neutral" default value, like "Select" or even just an empty string?