If conditions in Constraint

Welcome to the community, @kt2630! Here are some examples of using the if-statements under the constraint:

Another one:

And this one too:

This too:

These workaround should help you understand the if-statement and solve your issue.