Skip to main content
Known Participant
Jul 12, 2022 6:09 PM UTC
Answered

how to get value from a field to influence another field

Hi All

I'm trying to make 2 fields one is "Grade" and the other is "Result". I'm trying to make it so that if I put in a certain grade, it'll show pass/fail. I googled how to do this but couldn't get it to work. Any pointers is greatly appreciated.

 

I have a validation script on "Result" as:

 

var fieldA = this.getField("Grade").value;
if (fieldA=="A" || fieldA=="B" || fieldA=="C")
event.value = ("Pass");
else
{
event.value = ("Fail");
}

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jul 12, 2022 6:25 PM UTC

It should be a calculation script, and drop the parentheses around the string values.

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Jul 12, 2022 6:25 PM UTC

It should be a calculation script, and drop the parentheses around the string values.

Translate
Linh5FC5Author
Known Participant
Jul 12, 2022 6:27 PM UTC

Thank you!

Translate