Skip to main content
Participant
April 1, 2022
Question

Conditional Formatting from Dropdown Menu Selection

  • April 1, 2022
  • 1 reply
  • 516 views

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!!

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
April 1, 2022

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 = "";

Participant
April 1, 2022
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. ***