Display Price based on qty selected in the previous question | XM Community
Skip to main content

Survey

Are your interested in product X (Choice is Yes and No)

If “Yes” is slected then the 2nd question is No of Quantity Required. (Qty = 1 to 6)

Third question is Total Price 

Qty Price
1 7500
2 22500
3 37500
4 52500
5 67500
6 82500

 

Condition

  • If Qty 1 is selected then total price should be 7500
  • If Qty 2 is selected then total price should be 22500
  • If Qty 3 is selected then total price should be 37500
  • If Qty 4 is selected then total price should be 52500
  • If Qty 5 is selected then total price should be 67500
  • If Qty 6 is selected then total price should be 82500

Need JavaScipting help around this

 

 

You don’t need JavaScript, just a math expression.

Total price is $e{ ( q://QID2/ChoiceTextEntryValue + ( q://QID2/ChoiceTextEntryValue - 1 ) ) * 7500 }

Replace QID2 with the actual QID of the quantity question. 


Leave a Reply