0 Replies Latest reply on May 20, 2014 6:17 PM by maearnheart

# Custom calculation that results in a result generated in a field.

Hi All,

I'm stuck. I have a digital sales order form I created, but I am trying to have a field display either "D" or "ND" if certain criteria are met.

Basically, I'm trying to script something that determine if the total dollars amounts on the form include a discount of 7% or less

The way I look at it is like this: In my subtotal field, that would include any applicable discounts that were triggered by someone use a the dropdown next to the line item: My row looks like this:

Unit | Description of Item | Unit Price | Price | Code (Code would be where you could select a drop down, it would multiply by they decimal discount and recalculate value in the price field)

For example - 1 | Queen sized pillow | \$100 (\$90 after drop down is selected) | 10% off

Basically, I would want it to calculate the actual subtotal (inclusive of discounts) and the potential subtotal (exclusive of discounts), divide the actual into the potential, multiply by 100 and that will give me a percent. If that percent is .07 or less from 100%, it would generate a "ND" in a field. If it exceeded .07 it would generate a "D"

Here's a final example: sub total of \$10220, but when the drop downs for the discounts are applies it goes down to \$9410. \$9410/\$10220 = .9207 x 100 = 92.07% | 100% - 92.07% = 7.93%, therefore, that would trigger the box to display "D"

http://speedy.sh/eaX5Y/TCB-Sales-Sheet-Wellesley-MA.pdf

Cheers!