Ask the Expert

How can I sort a survey by answer?

I work for a school district, and our special services department needs to compile a "survey" that will ask questions about students' special needs. There will be about 170 questions and the answers will be either yes or no. I want to use radio buttons for the yes or no answers. Once the survey is complete, I want to be able to query only the "yes" answers onto another page. Basically, the "no" needs are to be disregarded. I hope you are able to understand this! What they do now is go through all 170 questions and delete the "no" answers. This is very time consuming, especially for a Special Ed teacher. Thank you in advance for any help you can give me.
The answer really depends on how you are collecting the answers. If you are just collecting them and storing them in session variables, then you'll have to have a processing loop on the result page that displays only the questions that received a "yes" response. If you are using a database, then you could have the result page generated using a SQL statement similar to the following: "SELECT * from SurveyResults where Response = 'Yes'". If you are storing the results to a text file, then I would only store the questions that received "Yes" responses (assuming each student gets his/her own file).

This was first published in May 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: