Copy link to clipboard
Copied
I am trying to write a calculation script where a certain field is 0 the event value produces the sum of 3 fields and when a different field is 0 the event value produces to the sum of 3 other fields. The script I have written is below. I keep getting a java script editor message "illegal character 2: at line 3. Can you provide some input as to what I am doing incorrectly to obtain my value?
if (this.getField("No of Lots").valueAsString=="")
{
event.value = ( this.getField (“Site Plan Rev Fee”).value + this.getField (“S&E Rev Fee”).value + this.getField (“Future Disturbed Fee”).value + this.getField (“Storm Rev Fee”).value;
}
else if (this.getField("No of Sheets").valueAsString=="")
{
event.value = (this.getField (“Subdiv Plan Rev Fee”).value + this.getField (“S&E Rev Fee”).value + this.getField (“Future Disturbed Fee”).value + this.getField (“Storm Rev Fee”).value;
}
Copy link to clipboard
Copied
Why do you use = ( in your code?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now