Setting up response validation
Validation provides a way of checking that the response to each question satisfies the survey’s requirements, such as, in the correct format or within a valid range. This helps to provide more accurate response data for your survey.
The validation available in Snap XMP includes:
- making a question mandatory, where the participant must answer it
- setting a response type
- setting the maximum length for a free format text answer
- adding a pattern, such as a date or email address, that the answer needs to match
- setting a minimum number of answers for multiple response questions
- setting a maximum number of answers for multiple response questions
- setting an initial value for a question
- making a question read only
Setting up validation in Snap Desktop
- Each variable has a set of individual properties. The properties depend on the type of question. You can examine and change the properties when you are in Design mode in the Questionnaire window.
- Select one or more questions and click Variable Properties on the Questionnaire toolbar. This opens the Variable Properties dialog.
- Edit the property values by entering or selecting a value for the required property. If you have selected several questions of the same type, you can change any properties they share.
More information about the variable properties can be found at Variable properties.
There is also a video available that includes a section on response validation in Snap Desktop at Snap XMP – Survey Logic in Snap Desktop from Snap Surveys on Vimeo.
Setting up validation in Snap Online
In Snap Online open the survey in the Build tab to edit the questionnaire. The Validation & Masking menu can be found in the Build side menu.
The validation properties shown depend on the question that is selected.
More information about the validation options in Snap Online can be found at Validation.
Some properties such as the response type or pattern are set in the question toolbar.
More information about the question toolbar can be found at Inserting questions.
There is also a video available that includes a section on response validation in Snap Online at Snap XMP – Survey Logic in Snap Online from Snap Surveys on Vimeo.
Making a question mandatory
When you want to make sure that a respondent answers a question, set the Must answer to Yes in Snap Desktop or select the Mandatory box in Snap Online. The respondent needs to answer the question before they can progress through the questionnaire. This can be used when questions further on in the questionnaire rely on an answer to an earlier question.
Setting the response type
When you create a question, a default response type is set for the pre-defined question styles. You can change the response type according to the question style and the requirements of the questionnaire.
The response types for Single Choice, Multi-choice and Grid questions are
- Single used in a Single choice, Multi choice or Grid question when only one answer is to be selected. For example, Yes/No or Age group questions
- Multiple is used in a Single Choice, Multi choice or Grid question when one or more answers can be selected
The response types for Open Ended, Open Series questions are
- Quantity allows only numbers to be entered.
- Literal allows any free format text, such as names and comments, to be entered.
- Date allows a range of date formats to be entered.
- Time allows a range of time formats to be entered.
More information about setting the response type can be found at Setting the response type.
An initial value can be set for a question. This value is selected or displayed in the question when a participant is completing the questionnaire. The Initial Value field can be set to a code, literal constant or an expression using values from the preceding questions.
More information about setting the initial value can be found at Setting an initial value.
When a question is set as Read only this prevents the participant from answering or overwriting that question during an interview.
The read only property may be used where:
- the question is seeded with values from a participant database that you do not want the participant to change
- the question contains an initial value that is based on answers to previous questions in the survey that you do not want the participant to change
More information about read only questions can be found at Creating a read only question.
Setting the minimum and maximum number of answers
You can set the minimum and/or maximum number of answers required for multiple response questions. When the minimum number of answers is set to a value greater than 0, the question automatically becomes mandatory. The maximum number of answers required cannot be greater than the code count.
Often you would like to ask the respondents of your survey to rank a number of options in a given order. A grid question can be used to achieve this by setting the Rating Check property. This property ensures respondents answer the question with only one ranking in each aspect or row.
More information about rating check can be found at Using Rating Check to ensure ranking
Setting an exclusive response
When you create a multiple choice question containing a list of items, it is unlikely that the list will contain all available options. You may provide one or more addition codes such as Other, Don’t know or None of the above. When these are selected, none of the other responses are applicable and should not be selected.
In the Exclusive property you can provide a list of the codes that may not be answered in combination with the other responses. When any of these codes are selected any other responses to the question are cleared.
Maximum length or number of characters
You can set the maximum length or number of characters entered in a free format text question, such as an Open Ended question. The respondent is limited to the maximum length for their answer.
You can add an expression in the Valid field of a variable so that the respondent can only enter data which matches the expression. For complex expressions it is better to use patterns.
The expression must be a list or range of possible values.
These can be
- limited range e.g., 1 TO 5 or 1~5
- unlimited range using relational operators such as > (greater than) e.g., >10 would include all values greater than 10
- ranges defined by variables in the questionnaire e.g., <Q9 would include all values less than the response to Q9
- a list e.g., 1,2,3
More information about setting valid ranges can be found at Setting valid ranges on a question
Setting the response format using Patterns
Patterns are used to define the format of the data that a respondent should enter when they are completing the questionnaire. They are used in open ended questions to check that the data is entered in the correct format.
In data entry, patterns are used to
- Ensure that respondents or data entry personnel enter the correct format for information such as postcodes, zip codes or National Insurance numbers. Pattern matching is used to check whether the answer is a possible match in the pattern.
- Convert the data into a standard form, such as adding currency symbols in quantity data.
Snap XMP is supplied with a library of pre-defined patterns. You can also create your own using the Patterns dialog in Snap Desktop.
More information about patterns can be found at Introduction to patterns.
Patterns can also be used to help validate responses from scanned questionnaires.
There are two types of scanning validation:
- Spelling validation checks a response against a stored dictionary of words and tries to match responses to words in the dictionary.
- Pattern validation attempts to match a response against the expected pattern of characters. This is often used to validate responses such as dates, telephone number and zip or post codes.
More information about patterns can be found at Using scanning validation patterns