Long 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 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];

Example :

HowMany “Q1. How many people live in your house?” long [1..20];

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 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.

HowMany.Ask()

This when the survey is run will display the following,

How many with an ASK
How many with an ASK

 

 

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?

HowMany.show()

How many with a SHOW
How many with a SHOW

 

 

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];
How many with size of box change
How many with size of box change

7 thoughts on “Long Questions”

  1. How do you add a “Don’t know” check box in a numeric question? Where/How in this code do you add something like this:
    SamplesDK “Don’t Know” dk
    I am getting syntax errors

  2. Hi Ami,
    You add special responses like “Don’t know” using a codes list. Here is an example that displays a “Don’t know” and a “Refused” category.

    HowMany “Q1. How many people live in your house?” long [1..20] codes (
    {
    DontKnow “Don’t know” DK,
    Refused “Refused to answer” REF
    } );

    The DK and REF keywords at the end specify that the exclusive, fix, and nofilter keywords should be automatically set.

  3. Hi Allison,

    I appreciate the help but I am still getting syntax errors. How do I add a don’t know response check box into the code below along with the style element to shorten the numeric field. Here is my original question that I want to add the “don’t know” to. Thanks

    Samples “Q1. How many samples were left?”
    style(
    Width = “3em”
    )
    long;

  4. Try

    HowMany “Q1. How many people live in your house?” style(
    Width = “3em”
    )
    long [1..20] codes (
    {
    DontKnow “Don’t know” DK
    } );

    Not sure what your issue was , but it might have been the charaters ” and the ‘ in Professional just retype them and you should be fine.

  5. dear,
    pls send me how to make questionnere filtering?

    example : q.a1:spontaneousawareness(first mentioned,)
    q.a2:spontaneous awareness(others mentioned)
    q.a3: most often uesd.

    pls help me

    thank u
    naj

Leave a Comment

%d bloggers like this: