How can i do the following calculation:
The calculation should go something like this:
If total amout is over 10[DISCOUNT1] and below 20[DISCOUNT2], the [DISCOUNTIF1] is 1,
If total amout is over 20[DISCOUNT2] and below 30[DISCOUNT3], the [DISCOUNTIF2] is 2,
If total amout is over 30[DISCOUNT3], the [DISCOUNTIF3] is 3.
Is this what you are after?
// form1.page1.subform1.discount::calculate - (FormCalc, client)
if (HasValue(totalPrice)) then
if (totalPrice > 10 and totalPrice < 20) then
$.rawValue = totalPrice * 0.01
if (totalPrice > 19 and totalPrice < 30) then
$.rawValue = totalPrice * 0.02
if (totalPrice > 29) then
$.rawValue = totalPrice * 0.03
$.rawValue = null