Copy link to clipboard
Copied
Hello,
I am making a dynamic form and I want the field "ScoringKey" to return a string based on a score that is calculated in the field next to it, "FinalScore". Is this possible? I cant seem to get the field "ScoringKey" to return a string no matter the parameters.
Basically
This is what I have for code:
if (FinalScore < 2 && FinalScore > 0.99) text = "Unsatisfactory";
if (FinalScore < 3 && FinalScore > 1.99) text = "Needs Improvement";
if (FinalScore < 4 && FinalScore > 2.99) text = "Meets Expectations";
if (FinalScore < 5 && FinalScore > 3.99) text = "Exceeds Expectations";
if (FinalScore === 5) text = "Outstanding";
Add this line to the start of your code:
var FinalScore = Number(this.getField("FinalScore").valueAsString);
And this line to the end of it:
event.value = text;
Copy link to clipboard
Copied
Where do you set the variable FinalScore?
Copy link to clipboard
Copied
Add this line to the start of your code:
var FinalScore = Number(this.getField("FinalScore").valueAsString);
And this line to the end of it:
event.value = text;
Copy link to clipboard
Copied
That worked perfectly, thank you!!