AnsweredAssumed Answered

If statement with && in the first argument

Question asked by mindymac03 on Mar 20, 2018
Latest reply on Mar 21, 2018 by jpmhuls

I have a calculated value control. For its formula, I want to evaluate a couple values on the form. For the the logical_test argument (first part of If statement), I have tried the following, and  I can't quite get the syntax. Ideas?

 

(I am looking for payment option of "Description A" and a payment amount between 5 and 10. String1 and String2 are the options for the calculated value to display.)

 

If(logical_test, value_if_true, value_if_false)

 

If(PaymentOption == "Description A" && PaymentAmt > 4.99 && PaymentAmt < 10,"String1","String2")

 

If((PaymentOption == "Description A" && PaymentAmt > 4.99 && PaymentAmt < 10),"String1","String2")

 

If((PaymentOption == "Description A") && (PaymentAmt > 4.99) && (PaymentAmt < 10),"String1","String2")

 

I can get it to work with any combo of two items in the logical_test argument. It's the third one that is throwing things off. 

Outcomes