-
karboskiAsked on June 28, 2024 at 3:31 PM
I've created a 4x5 table with dropdown responses (Y/N) in each cell. I'd like to perform a calculation based on if a Yes or No is in each table cell. What's the best way ?
-
Gian_D JotForm SupportReplied on June 28, 2024 at 4:21 PM
Hi James,
Thanks for reaching out to Jotform Support. I understand what you’d like to do, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.
-
Gian_D JotForm SupportReplied on June 28, 2024 at 7:43 PM
Hi James,
I saw that you're trying to calculate each cell in your Input Table widget, and using the Form Calculation widget, which is the best way to calculate each cell and display the result at the same time. But, one thing I saw is that you're using the dropdown input type as you mentioned to dictate "yes" or "no" answer, so I think you want to calculate the cell only if the user selected "yes." Although our system won't recognize the "yes" option to add a value for your calculation, as a workaround, you can use a checkbox input type instead to indicate that the cell needs to be added to the calculation as the checkbox and radio button are the only acceptable input types for calculation. I've cloned our form, and made the changes to demonstrate its functionality. Check out the screencast below:
As you can see, I was able to calculate the total value of the Input Table widget depending on the number of cells selected on it. You can clone my demo form to make things easier, or you can do it on your end. Let me show you how to do it:
First, let's change the input type of your Input Table widget:
1. In Form Builder, click on the Gear icon of your Input Table widget, and click on the Fields tab.
2. In Input Type section, click on Checkbox.Now, let's finish your formula in the Form Calculation widget:
1. Click on the Wand icon of your Form Calculation widget.
2. Copy the Form Calculation widget settings below:
That's it. Let us know if you have any other questions.