Forms - nested if statement could possibly solve?
at bottom of fillable sales pdf forms i've come unstuck, here's problem – after gross total there 3 charges can either added, taken away or not used @ all. here's how looks
gross total [ field 1 ]
additional charges (%) [ field 2a - percentage] [ field 2b - percentage result] [field 2c - gross total plus field 2b]
agency discount (%) [ field 3a - percentage] [ field 3b - percentage result] [field 3c - field 2c minus field 3b]
frequency discount (%) [ field 4a - percentage] [ field 4b - percentage result] [field 4c - field 3c minus field 4b]
total [ field should field 4c if empty go field 3c, if empty go field 2c if that's empty use field 1]
so how code total field appropriately reflects this?
any incredible.
thanks in advance,
claire
flickr screengrab – might seeing (http://bit.ly/12ro0dt)
otherwise it's here -
http://www.nature.com/content/22980-02_io_banner_single.pdf
what happens when of 3 fields blank?
for fields formatted numbers when blank treated 0 calculations. if use custom calculation script need force blank or null string value zero. necessary because "+" operator not additive operator concatenation operator or string combiner.
you cannot "field ..." since there no subtraction option available.
you can use simplified field notation no problems long field names named simplified field notation. field names must start alphabetic character , consist of alphanumeric values , have no white space or special characters within name. of course use special javascript escape character work around white space issue.
field\ 1 + field\ 2 - field\ 3b - field\ 4b
because of naming convention limited
var grosstotal = number(this.getfield("field 1").value);
var addcharge = number(this.getfield("field 2b").value);
var agencydisc = number(this.getfield("field 3b").value);
var freqdisc = number(this.getfield("field 4b").value);
event.value = grosstotal + addcharge - agencydisc - freqdisc;
More discussions in PDF Forms
adobe
Comments
Post a Comment