Skip to main content
Participating Frequently
September 6, 2022
Answered

Simple The Field-B Value is 25; the Field-A value is value found in Field-C I nned Adobe Java Scrpt

  • September 6, 2022
  • 1 reply
  • 1000 views

Using Adobe Acrobat Standard 2020; I have three fields (Field-A; Field-B, Field-C) I would like the following: If Field B is 25; then Failed -A is the value found in Filed C. Help Please.  Rookie here.

This topic has been closed for replies.
Correct answer Nesa Nurani

No Default yet I will try to put one in.  Here is is a picture of what I am trying to do.

 

 


Use this as custom calculation script of "EERate" field:

var drop = this.getField("EEDrop").valueAsString;
if(drop == "17")
event.value = this.getField("A17").value;
else if(drop == "16")
event.value = this.getField("A16").value;
else if(drop == "19")
event.value = this.getField("A19").value;
else
event.value = "";

1 reply

Nesa Nurani
Community Expert
Community Expert
September 6, 2022

What should happen to "Field-A" if value is not 25?

Use this as custom calculation script of "Field-B":

if(event.value == 25)
this.getField("Field-A").value = this.getField("Field-C").value;

Participating Frequently
September 6, 2022

Hello I was just using that as a value.  Here is teh Situation:

Field A: I want the result/value to show here

Field B: Is a dropdown with multiple numeric values to choose from

Field C: Has a value in it.

When a value is slected in Field B dropdown, tells Field A to pull value from specifc field (Field C)

 

Your help is truly appreciated.

 

 

Nesa Nurani
Community Expert
Community Expert
September 6, 2022

Script will do that, just change field names to your actual field names and if you have more than one condition, add 'else if' for other conditions.