# Regarding the Yes or No Button

**toclimateres**Scenario:

X is a drop down menu with 9 different options.

Y is a YES or NO Button. If Y=YES, then Y = 0; if Y=NO, then Y will take a some value based on the 9 different options of X.Question:

I just want to make sure there is no way to get around using 9 DIFFERENT if-statements for scenario, meaning that I can not combine them into 1 if-statement. I am asking because I want to have maybe 10 different YES or NO Buttons, which means I will probably end up with 90 different if-statements.Regards,

Jacob- JotForm Support
**BDAVID**Not sure if I understood what you mean, but here is my example based on the logic you have provided:

1) If you have a drop down field with 9 options, assign a value to each option: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

2) Then I guess you will be using a radio button for the "yes or no" question.

3) To obtain the result add a

**Form Calculation**field:4) Create the following conditions:

Result: https://form.jotform.com/63196600180956

So, I believe it will only take two conditions based on the scenario you described. Let us know if you need more help.

**toclimateres**Hi BDAVID, thanks for the speedy reply! Let me try again.

Scenario:

X is a drop down menu with 4 different options.

Y and Z are YES or NO Buttons.

If Y=YES, then Calc_Y = 0, regardless of the value of XIf Y=NO and X=Option1, then Calc_Y = 1

If Y=NO and X=Option2, then Calc_Y = 2

If Y=NO and X=Option3, then Calc_Y = 3

If Y=NO and X=Option4, then Calc_Y = 3

If Z=YES, then Calc_Z = 0, regardless of the value of X

If Z=NO and X=Option1, then Calc_Z = 3

If Z=NO and X=Option2, then Calc_Z = 7

If Z=NO and X=Option3, then Calc_Z = 6

If Z=NO and X=Option3, then Calc_Z = 8

Like the following:

I just want to make sure there is no way to get around of using 8 (4*2=8) DIFFERENT if-statements for the scenario. Because I want to have 10 YES-or-NO buttons, which means I will end up having 40 if-statements.- JotForm Support
**david**From the looks of your setup, it would require a one condition per output. I do not see a way to do this with calculations alone that would reduce the number of statements that would need to be made.

**toclimateres**Okay, thank you David!