- September 29, 2011 at 2:37 pm #836
I have a form that has 94 sepreate questions that each have a yes or no answer within a drop down menu. I would like to have a report, that is in a table format that will list all 94 questions in one column & then would like to have 2 more columns next to this (one titled yes & the other titled no) which will display a count of how many times each question has been answered Yes Or No. Is this possible? as i cannot seem to find a way to pull all the questions into one column!September 29, 2011 at 6:18 pm #5876
Dennis @ PerfectFormsBlocked
First create a connection to your survey form. In the action you need no send parameters and return the caption value for every drop down.
In your report add two tables. The first table is a hidden helper table. It has 94 columns, one for each question. The second table should be read-only and have three columns: Question #, Yes, and No. Then you will need to add 188 hidden helper fields: a yes and a no counter field for each question.
When the report opens create a behavior that adds 94 new rows to the second table and number the first column sequentially from 1 to 94. To do this use a hidden helper field for the row count. If you don’t know how to do this let me know and I can describe it.
When the page opens create a behavior that uses a connect to enter the value of each question in all rows of each column of the helper table. Then use a Set Table Rows behavior object to move to the first row of the helper table and use a simple branch (is value in column 1 – current row = “yes”?). If true set the question 1 yes counter helper field with the formula: Value of question 1 yes counter + 1. If false set the question 1 no counter helper field with the formula: Value of question 1 no counter + 1. Then use another simple branch for question 2 and build it all of the way to question 94.
After question 94 move to a Set Table Rows behavior object and move to the first row of your read-only table. Then use a Set Field behavior object to set the value of your Yes column – current row with the value of the question 1 yes helper field. Do the same for the no column. Then move to the next row and do the same for question 2. Repeat to question 94.
Hopefully that is clear. The concept is simple but will be a bit tedious to build because you are dealing with a yes and a no for 94 questions.September 30, 2011 at 10:26 am #5877
Thanks for the above, i have just created this but using only the 1st 2 questions as a test. everything works well with an exception of it is not counting all instances, rather it is only counting the value of the 1st row. we have 117 form instances so i was expecting the Yes & no columns for each question to total up to 117, with this solution i am only seeing 1 in either the yes or no column. do you think i may have missed something here?September 30, 2011 at 3:26 pm #5878
Dennis @ PerfectFormsBlocked
I omitted something in my description, sorry. You need to loop through the helper table until you reach the bottom.
After question 94 go to Set Table Rows and move to the next row of your helper table. then to a simple branch (last behavior successful?). If true loop back to the first simple branch for question 1. If false go to the Set Table Rows object for the read-only table.October 3, 2011 at 1:53 pm #5879
Ahh thats done the job. Thanks alot for your help. was very tedious but got there in the end
You must be logged in to reply to this topic.