• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

how to get value from a field to influence another field

Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

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");
}

TOPICS
Acrobat SDK and JavaScript

Views

251

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

Community Expert , Jul 12, 2022 Jul 12, 2022

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

Votes

Translate

Translate
Community Expert ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

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

Votes

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
Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

LATEST

Thank you!

Votes

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