0

I have an if then question. If two numbers equal 50 then 0. If two numbers equal < 50 then I need the sum of those numbers to be the result.

1 Answer 1

1

You can write conditional calculations in Cognito Forms in two ways:

  1. Use if condition then true result else false result
  2. Use condition ? true result : false result

In your case, let's assume you have two number fields, Number1 and Number2. In this case the calculation would be:

=if Number1 + Number2 = 50 then 0 else if Number1 + Number2 < 50 then Number1 + Number2 else ???

In the example above, I left ??? in place for the required final else, because I do not know from your question what should happen when the two numbers are greater than 50. If this is never going to be possible, then you could use the following less complex calculation:

=if Number1 + Number2 = 50 then 0 else Number1 + Number2

3
  • I need a return of 0 if the result is > 50 but if the number is < 50 I need the result subtracted from 50
    – Vernon
    Feb 3, 2016 at 21:58
  • I need a return of 0 if the result is > 50 but if the number is < 50 I need the result subtracted from 50
    – Vernon
    Feb 3, 2016 at 22:05
  • sorry having internet connection problems
    – Vernon
    Feb 3, 2016 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.