What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How to setup conditions to count the number of male or female studentsAsked by nystea on October 20, 2016 at 11:51 PM
I have the referenced form mostly working. At this conference, we need to know the student count by gender to figure rooming. Adult room configuration is too complicated to write the logic and we do it by hand. The students are assigned to 3, 4, or 5 bed accommodations based on total enrollment and the gender mix. Knowing the count by school helps us house each school in the same wing and floor.
The goal is to have Total People Attending, Total Students, Total Female Students, and Total Male Students. I have learned the hard way that I cannot trust the adult submitting the form to manually enter an accurate count.
I have the formulae worked out to count everyone using a value assigned to Last Name Is Filled. (Attend"X" = 1)
Total Students is keyed to the Type field: Students have a value of "1". All others are at "0".
Last Name Total - Type Total = Non-Student Total (A field I have not built yet).
Total Female is keyed to Gender with F=1, M=0.
Total Male = Total Students - Total Female.
My issue is that I can't figure out how to get Gender for just Students. The gender count currently applies to everyone.
Using FileMaker, I would write something like If (Type = Student AND If (Gender = F, "1". Else "0")) to count Total Female Students. I would use Total Students - Total Female Students to get Total Male Students.
I'm sure there are other ways to count Non-Students that might make more sense. I don't know how to use them within the JotForm conditional settings.
Am I on the right track? How can I split out Students by Gender to get these results?
To make things easier I'd like to re-state how you want to configure your form. You want to count the total number of students (not adults) and you want to separate them by their genders. You do not want the adults to be mixed up in gender count.
Well, this should be possible to do by using the right conditions. I have created a simple form which should be able to meet your demand. Please check this form:
What I am simply doing here is to calculate the value of the Male or Female Student fields' values depending on the selection on the "Specify" field.
Check my conditions here:
Of course, you will need to add many more fields like this but it's pretty simple to set up similar conditions for them too.
Please check out this form. You can clone it and build your form upon it. Let me know if it works for you. Instead of your attendees to fill the numbers, making them specify the attendees and counting the numbers depending on those specifications should definitely decrease the margin of error.
Thank you so much for contacting us. Please let us know whenever you need assistance, we will be glad to help you.
The form URL you gave me goes to a customer satisfaction survey. Perhaps when I see your example, it will make sense.
If I understand correctly, it is almost like voting where Male and Female are two candidates. You're increasing the count by 1 each time the selection is made.
I don't want to have a separate non-student gender field.
If Type = Student, look at Gender to increase M or F by 1
is the logic. I get lost trying to use one field to determine how a second is used in a formula.
I do apologize about owen posting the wrong link as I think he intended to give you a different one though I am not sure where it is after looking for the demo on his account.
From what he's stated though you're correct that it would identify by being a genderfluid setup so that the calculation can configure your totals for you but, to our understanding you don't want that and you want to keep it generalized.
Please allow us a bit more time to look into any other alternatives that might work for this and if we figure something else out that works we'll update you again as soon as we can.
Hi, I had a thought on this.
Can I create a combined field of Type and Gender and then test for that?
"Type" choices = Student, Sponsor, Chaperone, Committee, Presenter, Guest
"Gender" = M, F
"Calc_Field" = "Type" & "-" & "Gender"
Then count each permutation. I only care about student and non-student, so I think I only need 4 output fields to count. Student_Male, Student_Female, Others_Male, Others_Female
I can't figure how to have logic in a calc field. One possibility would be
If Student-F , +1
If Student-M, +1
If F AND Not-Student-F, +1
If M AND Not-Student-M, +1
The Not-students create a problem. Not-Student-F would count Males as well.
The alternative would be
If Student-F , +1
If Student-M, +1
If Sponsor-F, +1
If Sponsor-M, +1
etc for all 6 Types
It would require 6 conditions for each of the 36 attendees. I really don't want to make 198 fields. Or have to add them all together at the end.
I'm hopeful that exploring options will find a better way to make this work.
Thanks for your help!
Please accept my apology about posting a wrong version of my example form. I have reverted it back to the right version now. As far as I understand, you do not care about the genders of adults. It's the genders of students that you care about.
Please check my form here again and see if it is close to your desired form. Let me know what you think of it so that I can further edit it accordingly.
Thank you for contacting us.