If else not working
Hi
I spent a lot of time reading and talking with folks. Finally wrote the script properly
Adobe said no problems but it still doesn't work.
[side question: javascript developer was unsure about event.value and this.getfield. These are defined by Acrobat?)
Have drop down field with 3 results: Pass, Fail or NA
IF Pass then print averagesupplyrows
If Fail then print averagesupplyrowsleft
IF NA then print NA
see script:
var nSupplyvelocitypassfailnaDD = this.getfield("SupplyvelocitypassfailnaDD").value;
var nAveragesupplyrows = this.getfield("averagesupplyrows").value;
var nAveragesupplyrowsleft = this.getfield("averagesupplyrowslefta").value;
if( SupplyvelocitypassfailnaDD == "Pass" ) {
event.value = nAveragesupplyrows;
}
else if( SupplyvelocitypassfailnaDD == "Fail" ) {
event.value = nAveragesupplyrowslefta;
}
else if ( SupplyvelocitypassfailnaDD == "NA" ) {
event.value = "NA";
}
