Boolean Questions

A while back we noticed that someone searched the website for information about mrInterview questions types, so we have decided that we will add some articles about all the question types you can have in mrInterview. This article is about the “Boolean” question types.

Boolean Questions : You use the boolean question type when you want to allow your respondents to switch something on or off. When creating boolean questions we need to follow the following structure in out metadata section

[QuestionName] [QuestionText] boolean ;

Example :

Subscribe “Q1. Tick this box if you would like to subscribe to our news letter” boolean;

Where :

QuestionName is the name of the question. There are a few things we should consider when creating our question names and your company may already have some rules that you need to follow, if you don’t have any rules to follow you should think about a few things. In our example we have decided that the question will be called Subscribe, the reason we have chosen this name is because it describes the question that we are collecting information into and makes it easier for people to understand when it comes to using this data for tabulating or data management.  We could have called our question “Q1” as it is our first question, and for some people this works, but just think about what happens when you have to add a question in before Q1 ?. Thinking a little about this before you start will save you time in the long run.

QuestionText is the text that is displayed to the respondent. You can put whatever text you like in here and if you really need to, you can but html code in this also. For example if you wanted to make a word “news” stand out we could make it bold. To do this we would type “Q1. Tick this box if you would like to subscribe to our news letter”

Next we have our “Question Type”, in this example we want to have a “Boolean” type question for more information on question types please click here.

Now that we have our metadata we need to know how to ask the question. To do this we need to put the following code in the routing section of our MDD file.

Subscribe.Ask()

This when the survey is run will display the following,

Boolean ( Yes / No )
Boolean ( Yes / No )

Now that we asked the question we may want to do other things to it, they could be ,

Q: How do I show my question so that it is read only?

Subscribe.show()

Leave a Comment