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 numerical long question type.Long Questions : You use the long question type when you want to allow your respondents to enter whole numbers. When creating long questions we need to follow the following structure in out metadata section
[QuestionName] [QuestionText] long [Ranges];
HowMany “Q1. How many people live in your house?” long [1..20];
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 HowMany, 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 “people” stand out we could make it bold. To do this we would type “Q1. How many people live in your house?”
Next we have our “Question Type”, in this example we want to have a “Long” type question for more information on question types please click here.
Ranges are the allowable numbers that the respondent can enter. In our example we have “[1 .. 20]” this means the respondent is allowed to enter a number between one and twenty inclusive. The allowable ranges are, Range -2,147,483,648 to +2,147,483,647. To see the different types of ranges that you can have 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.
This when the survey is run will display the following,
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?
Q: How do I change the size of the box that I enter my number in?
HowMany "Q1. How many people live in your house?" style( Width = "20px" ) long [1..20];