"If Blank then txtField = 0" statements

J

Jeff Woiton

Not sure how to make one of these work. Here's an example:

txtField1 = $1000 (subtotal from above, simple addition)
txtField2 = $2000 (custom work, subject to discount)
txtField3 = $3000 (custom work, not subject to discount)
txtField4 = 10% (discount amount - basically, ((1+ 2) * 4) *-1)
TxtField 5 = Sum of ((1 + 2) + 3 + 4)

Sometimes txtField2 will be unused, so when I apply a discount, I get
NaN in both txtField2 and txtField4. That's because it's adding
txtField1 = txtField2 but there's nothing in txtField2.

What I want is a formula that says, "If txtField2 is unused, its value
is zero, else calculate the discount". I think the problem lies in the
txtField3 calculation.

Here's the formula as it stands in txtField3:
((txtExtendedPrice + txtCustomExtendedPrice) * txtDiscountPercent) * -1

or, if you choose Xpath:
((../../my:rgpProducts/my:rptProducts/my:txtExtendedPrice +
.../../my:eek:ptCustom/my:eek:ptCustomPricing/my:eek:ptCustomStuff/my:txtCustomExtendedPrice)
* ../../my:eek:ptDiscountPercent/my:txtDiscountPercent) * -1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top