
Name: Keith Krystek
About
Keith: Before joining SPSS Inc. in May 2003, Keith worked with our survey software as a market research and human resources consultant. He has a BA from Illinois Wesleyan University, and an MBA from Thunderbird–Garvin School of International Management. In his spare time, Keith enjoys hiking, biking, and traveling with his family.
Create a better respondent experience with global questions
When surveying respondents, you can place a question on every page that allows them to change an attribute of the survey or take some other action.
These questions, called global questions, may enable respondents to:
With mrInterview 5.5, you can create global questions on each page of your survey. Global questions typically appear in coordination with additional code in the OnBeforeQuestionAsk or OnAfterQuestionAsk events where the information from the global questions will be used to complete actions to support them. Global questions are a collection of questions similar to a page or banners. You begin by defining the questions in the metadata section in the normal way for that type of question.
In the example below, you’ll set up a comment question for each screen. Comments from each screen will be concatenated into an overall comment question for analysis. This overall comment question will be comprised of a global text question to collect the comments, a text question to hold the concatenated comments, and interview events to transfer the comments.Choose the Classification and Regression Tree model in SPSS Decision Trees to begin rule induction:
Start by defining two questions: one to collect comments and one to hold concatenated comments. In Dimensions interview scripting, this appears as:
YourComments "General comments" text [..50];
AllComments "" text;
To make the YourComments question appear on every page, add the question to the GlobalQuestions collection in the routing section where you want to start adding YourComments to each page:
IOM.GlobalQuestions.Add(YourComments)

Figure 1: YourComments appears on each page as a global question.
Use the script in the OnAfterQuestionAsk event to copy the comments. This event is a subroutine defined in your routing section that runs after every page in a survey. In this example, define this event as follows:
Sub OnAfterQuestionAsk(Question, IOM)
If IOM.Questions["YourComments"].Response.Value<>null Then
IOM.Questions["AllComments"].Response.Value =
IOM.Questions["AllComments"].Response.Value +
IOM.Questions["YourComments"].Response.Value + " "
IOM.Questions["YourComments"].Response.Value=null
End If
End Sub
The response text of the YourComments question is added to the existing AllComments response text.
You can also choose another location for this type of question in the template. To do so, use a named
<table width="80%">
<tr>
<td align="right">
<mrData QuestionName="YourComments">Comments Question here</mrData>
</td>
</tr>
<tr>
<td align="left">
<mrData>Other non comment questions here</mrData>
</td>
</tr>
</table>
The global question will appear in the upper right part of the table above, while other questions will be inserted on the left side of the table:

Figure 2: The global question is placed in the upper right corner of the template.
Figure 3: The accumulated comments are displayed on the final screen.
The following information item is added to the metadata for this questionnaire:
SendComments "You entered some general comments during the interview.
<br/><br/>Your comments: {#AllComments}<br/><br/><br/>
Please click <a href='mailto:projectmanager@spss.com?subject=General comments&body={#AllComments}'>here</a>
to review them and send them to the project manager. <br/>
Thank you for your help." info;
Within the information item text, several pieces have been included:
IOM.LayoutTemplate="DefaultLayout_GlobalQ.htm"
YourComments.Style.Height="3em"
YourComments.Style.Width="10em"
YourComments.MustAnswer = False
IOM.GlobalQuestions.Add(YourComments)
Cares.Ask()
Respect.Ask()
Profits.Ask()
IOM.GlobalQuestions.Remove(0)
SendComments .Show()
Sub OnAfterQuestionAsk(Question, IOM)
If IOM.Questions["YourComments"].Response.Value<>null Then
IOM.Questions["AllComments"].Response.Value = _
IOM.Questions["AllComments"].Response.Value + _
IOM.Questions["YourComments"].Response.Value + " "
IOM.Questions["YourComments"].Response.Value=null
End If
End Sub
Similarly, global questions could also be used to allow a respondent to change the language in which questions are displayed. Script could be used in both the OnBeforeQuestionAsk and OnAfterQuestionAsk events to set the interview’s language property and handle the possibility of snapbacks.
You could also create global questions with code in the OnAfterQuestionAsk event to reset the layout template or other properties used to display subsequent survey questions.
By using global questions, you create a better experience for respondents by enabling them to customize the characteristics on each survey page.
We offer SPSS courses at locations around the world.
Find a course in the location nearest to you.
Predictive Analytics
can make your organization
more
successful
Resources