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
ptCustom/my
ptCustomPricing/my
ptCustomStuff/my:txtCustomExtendedPrice)
* ../../my
ptDiscountPercent/my:txtDiscountPercent) * -1
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
* ../../my