Copy link to clipboard
Copied
Hello,
I have a table with 5 columns. Column 2 has a drop down list with options "Each", "Feet", and "N/A". I would like how to get column 5 to auto populate depending on the selection from the drop down.
1. If Column 2 = Each, then Column 5 = Column 4*Column 1
2. Else, Column 5 = Column 4
I have found similar posts and tried both a custom calculation and validation script but it does not work.
Please help.
Copy link to clipboard
Copied
You can use something like this in each row of column5 "custom calculation script":
if(this.getField("dropdown").value == "Each"){
event.value = this.getField("Col1Row1").value * this.getField("Col4Row1").value;
}
Rename fields for each row, It's basic code but it should get you there with little adaptation.
If you have any question feel free to ask.
Copy link to clipboard
Copied
Sorry, this is on Adobe Acrobat Pro DC creating a form
Copy link to clipboard
Copied
Hi, can you pls be more specific, how many rows in each column and when calculate you calculate entire column or row by row? example: when you say Column 5 = Column 4*Column 1 you mean:
col1row1*col4row1 result in col5row1
col1row2*col4row2 result in col5row2
or col1 all rows * col4 all rows result in one field in col5?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You can use something like this in each row of column5 "custom calculation script":
if(this.getField("dropdown").value == "Each"){
event.value = this.getField("Col1Row1").value * this.getField("Col4Row1").value;
}
Rename fields for each row, It's basic code but it should get you there with little adaptation.
If you have any question feel free to ask.
Copy link to clipboard
Copied
Thank you so much! This worked!
Copy link to clipboard
Copied
I'm trying to change the results of a dropdown field depending on what's selected in another field....
So, in Dropdown1 if I select "Arlon 510GT (or MT)" I want Dropdown2 to select the "Arlon 3450 Gloss" line.
I added this to the Dropdown1 /calculate/custom calculation script but it;s not working.....
Copy link to clipboard
Copied
If you already have set values in both fields, and you have no export values, use this as 'Validate' script of Dropdown1:
if(event.value == "Arlon 510GT (or MT)")
this.getField("Dropdown2").value = "Arlon 3450 Gloss";