Conditional Formatting from Dropdown Menu Selection

New Here ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Hello,

I need help writing a conditional format that references the result from a dropdown selection.

 

If "Pooled" is selected, I need the "PoolVol" cell to display the value of  "Ejac1vol" + "Ejac2vol"

If "Ejac #1 Only" is selected, I need the "PoolVol" cell to display the value from the "Ejac1vol" cell

If "Ejac #2 Only" is selected, I need the "PoolVol" cell to display the value from the "Ejac2vol" cell 

 

Thank you for your help!!

 

Screenshot 2022-03-31 205506.pngScreenshot 2022-03-31 205434.png

TOPICS
JavaScript , PDF forms

Views

45

Likes

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
Adobe Community Professional ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Use this as 'Validation' script of dropdown field and also in dropdown field under 'options' tab check 'Commit selected value immediately':

var pv = this.getField("PoolVol");
var e1 = Number(this.getField("Ejac1vol").value);
var e2 = Number(this.getField("Ejac2vol").value);
if(event.value == "Pooled")
pv.value = e1+e2;
else if(event.value == "Ejac #1 Only")
pv.value = e1;
else if(event.value == "Ejac #2 Only")
pv.value = e2;
else
pv.value = "";

Likes

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
New Here ,
Apr 01, 2022 Apr 01, 2022

Copy link to clipboard

Copied

LATEST
Thank you! Thank you!!

________________________________
*** The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copies of it. If you have any questions concerning this message, please contact the sender. ***

Likes

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