Regarding the Yes or No Button

• toclimateres
Asked on November 15, 2016 at 05:03 PM

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

• BDAVID
Answered on November 15, 2016 at 06:36 PM

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:

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

• toclimateres
Answered on November 16, 2016 at 10:14 AM

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 X

If 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.

• david
Answered on November 16, 2016 at 11:33 AM

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
Answered on November 16, 2016 at 07:17 PM

Okay, thank you David!