Price change with if condition

hi, I need to multiply the price base on the results of two fields, if field “temp-a” is less or equal to field “temp-b” or else, it is easier to see this:

if ( temp-a <= temp-b ) { price * temp-a }
else { price * temp-b }

any suggestions?

You might try the following – set up a hidden number field to calculate and compare the temp values and corresponding product.

Field A:
calcuationtemp-b – temp-a

You could then have two product fields conditionally shown.

Product 1:
conditionshow if Field A > 0 OR Field A = 0
calcuationprice * temp-a

Product 2:
conditionshow if Field A < 0
calcuationprice * temp-b

1 Like