Creating Skip and Filter Instructions
Creating Skip Instructions | Creating Filter Instructions | Creating Item Filter Instructions Checking Skip/Filter Instruction Syntax
The following sections provide information about creating skip and filter instructions. They include information about creating basic skip, filter, and item filter instructions, creating unconditional skip and filter instructions, as well as using a variety of skip/filter logical operators, mathematical operators, and/or mathematical functions. They also include information about checking the syntax of your skip and filter instructions.
Skip and filter instructions are used to determine the response set flow (or response set order) of a questionnaire. Skip and filter instructions, respectively, determine based on the specified criteria (e.g., a respondent’s answer to a previous response set) where the next response set in the questionnaire is located and whether a particular response set should be asked. Item filter instructions are used to determine based on the specified criteria whether a specific response item should be enabled or disabled. Skip and filter instructions enable you to create flexible questionnaires that adjust the response sets survey respondents answer based on the specified criteria. Item filter instructions enable you to create flexible questionnaires that adjust the response items available to survey respondents based on the specified criteria.
Skip, filter, and item filter instructions are linked to response sets. Skip instructions are processed after their corresponding response set is answered and determine based on the specified criteria where the next response set in the questionnaire is located. Filter and item filter instructions are processed before their corresponding response set is displayed and, respectively, determine based on the specified criteria whether that response set should be asked and whether a specific response item should be enabled. If no skip or filter instructions are encountered for a given response set, by default, AskAnywhere moves to the next response set in the questionnaire. If no item filter instructions are encountered for a given response set, by default, AskAnywhere enables all the response items in the response set.
Notes:
- Although AskAnywhere automatically updates skip and filter instructions when you delete or add pages and/or response sets to a questionnaire, we recommend that you set up skip and filter instructions as one of the last steps in the final preparation of your questionnaire. We recommend this because there are certain scenarios in which AskAnywhere cannot update the skip and filter instructions as you may desire (e.g., relative skips). Also, please be sure to check the accuracy of your skip and filter instructions before distributing your questionnaire.
- Randomizing pages of a questionnaire can adversely affect skip/filter instructions, thus causing them to work erratically.
- You can mix skip, filter, and item filter instructions on a Skip/Filter Instructions window, although this should be done with great care so that the logic does what you intend it to do.
-
The system processes skip, filter, and item filter instructions as follows.
- Before a response set is processed, the system evaluates the filter instructions from top to bottom. When it encounters filter criteria that test “true,” the system evaluates and carries out any item filter instructions, ignores any subsequent filter instructions, and includes the response set as defined by its filter and item filter instructions. When it encounters filter criteria that test “false,” the system ignores the corresponding filter instruction and moves to evaluate the next filter criteria. The system continues in this manner from top to bottom through all of the filter instructions and item filter instructions, if appropriate. If all of the filter criteria test “false,” the system excludes the corresponding response set from the questionnaire and ignores any associated item filter instructions.
- After a response set is processed, the system evaluates the skip instructions from top to bottom. When it encounters skip criteria that test “true,” the system carries out the corresponding instruction and ignores any subsequent skip instructions. When it encounters skip criteria that test “false,” it ignores the corresponding skip instruction and moves to evaluate the next skip criteria. The system continues in this manner from top to bottom through all of the skip instructions. If all of the skip criteria test “false,” the system moves the respondent to the following response set in the questionnaire.
Creating Skip Instructions
Skip instructions are processed after their corresponding response set is answered and move respondents from one response set to another based on the specified skip criteria. For instance, you may ask one question to which respondents may answer “yes” or “no.” If respondents answer in the negative, you may want them to skip the next response set(s).
For example, one of the first response sets in a coffee survey might contain a simple skip instruction to allow respondents who don’t drink coffee to go directly to the demographic response sets at the end of the questionnaire. Additionally, a response set in a math test/tutor survey might contain a simple skip instruction to take respondents who enter the correct answer for an addition problem to the subtraction section of the questionnaire. These types of skips are some of the simplest and most widely used; they simply prompt the questionnaire to skip the next response set(s) based on the specified skip criteria (e.g., a respondent’s answer to a previous response set).
To create skip instructions, complete the following steps.
- Open the Skip/Filter Instructions window in one of the following ways.
 - Select the desired answer frame and then select Skip/Filter Instructions from the Utilities menu.
- Select the desired answer frame and then select Ctrl + K.
- Select the desired answer frame while holding down the Ctrl key.
- The Skip/Filter Instructions window opens. Under the Skip/Filter Criteria heading, enter the desired criteria for your skip instructions.
These criteria must be statements that test “true” or “false” (e.g., q1=1, q1:1>2, fruit “no”, q1+q2<10). If the criteria test “true,” the system will carry out the corresponding skip instructions; if the criteria test “false,” the system will not carry out the corresponding skip instructions.
You may enter skip criteria using the following types of information.
 - You may enter skip criteria by using answer numbers.
To do this for fixed-choice response sets, under the Skip/Filter Criteria heading, enter answer numbers as q# (where “#” is the number of the desired response set). To do this for open-ended response sets, under the Skip/Filter Criteria heading, enter answer numbers as q#:# (where “#:#” is the number of the desired response set). For example, using the coffee example outlined previously, under the Skip/Filter Criteria heading, enter q1=2 where “q1=2” tests whether the answer value for question 1 is equal to a value of 2.
Note: For fixed-choice response sets, the answer number is identified in the Answer field on the Answer Editing window. For open-ended response sets, the first part of the answer number is identified in the Answer field on the Answer Editing window; the second part of the answer number corresponds to the item number within that response set.
 - You may enter skip criteria by using variable names. Variable names can include answer variable names as well as other system variables set throughout the questionnaire.
To do this, under the Skip/Filter Criteria heading, enter variable names as varname (where “varname” is the desired variable name). For example, using the coffee example outlined previously, under the Skip/Filter Criteria heading, enter drink=2 where “drink=2” tests whether the value for the question with a variable name of drink is equal to a value of 2.
Note: The variable name for each response set is identified in the Variable Name field on the Answer Editing window. In addition, when the answer variable name has been set for a particular response set, the Answer field at the top of the Skip/Filter Instructions window, which typically displays the answer number, displays the answer variable name instead.
 - You may enter skip criteria by using values.
To do this, under the Skip/Filter Criteria heading, enter values as # (where “#” is the desired value for which to test). For example, using the coffee example outlined previously, under the Skip/Filter Criteria heading, enter q1=2 where “q1=2” tests whether the answer value for question 1 is equal to a value of 2.
 - You may enter skip criteria by using text.
To do this, under the Skip/Filter Criteria heading, enter text as “xxxxx” (where ““xxxxx”” is the desired text for which to test). Note: To specify text in skip/filter instructions (e.g., q1=“coffee”) you must enter the text in quotation marks; otherwise, the system assumes the text is a variable name. For example, using the coffee example outlined previously, under the Skip/Filter Criteria heading, enter q1=“coffee” where “q1=“coffee”” tests whether the answer value for question 1 is equal to a text value of coffee.
 - You may enter skip criteria by using skip/filter logical operators (located in the Logic pull-down menu on the Skip/Filter Instructions window). The following table details each of the skip/filter logic abbreviations and symbols.
| EQ |
= |
Equal To |
| NE |
 |
Not Equal To |
| LT |
< |
Less Than |
| LE |
 |
Less Than or Equal To |
| GT |
> |
Greater Than |
| GE |
 |
Greater Than or Equal To |
| AND |
& |
And |
| OR |
| |
Or |
Notes:
- You can use the abbreviations (surrounded by spaces and in any combination of uppercase and lowercase) or the symbols (surrounded by spaces or not) to specify skip/filter logical operators in skip criteria.
- Parentheses are required in skip criteria when using Boolean operators (e.g., and, or). This requirement is so that the system knows how to correctly process the skip instructions.
 - You may enter skip criteria by using the skip/filter mathematical operators (located in the Math pull-down menu on the Skip/Filter Instructions window). The following table details each of the skip/filter mathematical operators.
| + |
Addition |
| - |
Subtraction |
| / |
Division |
| * |
Multiplication |
|
|
Range |
Note: You can use the symbols (surrounded by spaces or not) to specify skip/filter mathematical operators in skip criteria.
 - You may enter skip criteria by using the skip/filter mathematical functions (located in the Functions pull-down menu on the Skip/Filter Instructions window). The following table details each of the skip/filter mathematical functions.
| ROUND( ) |
Round to an integer.
[e.g., ROUND(12.7) is 13] |
| TRUNC( ) |
Truncate to an integer.
[e.g., TRUNC(12.7) is 12] |
| SQR( ) |
Square of the value.
[e.g., SQR(3) is 9] |
| SQRT( ) |
Square root of the value.
[e.g., SQRT(9) is 3] |
| PowerTwo( ) |
Return 2x.
[e.g., 23 is 8] |
| Random( ) |
Return a uniform, pseudo-random, real number between 0 and the value provided.
[e.g., RANDOM(99) can be as high as 98.99 or as low as 0.00] |
| ButtonX( ) |
Return a 1 if button X was selected; otherwise, return a 0.
[e.g., Button2(Q27) will equal 1 if the second button in question 27 was selected.]
Note: The BUTTONX( ) function only works with multiple response items. |
| NumButtons( ) |
Test whether a given number of buttons were selected.
[e.g., Numbuttons(Q14)=3; Were three buttons selected in question 14?]
Note: The Numbuttons( ) function only works with multiple response items. |
| Len( ) |
Measure the length of a string entered by a survey respondent.
[e.g., LEN(Q3) > 15]
|
| IsNumber( ) |
Return a Boolean value (true/false) if the operand is/isn't a number.
[e.g., IsNumber(q2:2)] |
| ToNumber( ) |
Convert a string value to a numeric value. The result can be used in mathematical operations.
[e.g., ToNumber (q2:2)+15] |
| LowerCase( ) |
Convert all characters of a string to lower case.
[e.g., LowerCase(q2:2)="open sesami"] |
| UpperCase( ) |
Convert all characters of a string to upper case.
[e.g., UpperCase(q2:2="OPEN SESAMI"] |
Notes:
- You can use the abbreviations (in any combination of uppercase and lowercase) to specify skip/filter mathematical functions in skip criteria.
- Parentheses are required in skip criteria when using skip/filter mathematical functions (e.g., LowerCase, Button, SQR). This requirement is so that the system knows how to correctly process the skip instructions.
- Under the Skip to Q # heading, enter the response set to which you want the questionnaire to skip when the corresponding skip criteria test “true.” You may identify the desired response set in one of the following ways.
 - You may enter the skip to location by using an answer number.
To do this, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter the answer number as # (where “#” is the number of the response set to which you want the questionnaire to skip when the skip criteria test “true”). For example, using the coffee example outlined previously, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter 15, where “15” indicates that the questionnaire should skip to response set 15 (the first demographic response set at the end of the questionnaire) if the corresponding skip criteria test “true.”
Note: The answer number is identified in the Answer field on the Answer Editing window.
 - You may enter the skip to location by using an answer variable name.
To do this, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter varname (where “varname” is the variable name of the response set to which you want the questionnaire to skip when the skip criteria test “true”). For example, using the coffee example outlined previously, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter demographics, where “demographics” indicates that the questionnaire should skip to the response set with the answer variable name of demographics (the first demographic response set at the end of the questionnaire) if the corresponding skip criteria test “true.”
Notes: The variable name for each response set is identified in the Variable Name field on the Answer Editing window. In addition, when the answer variable name has been set for a particular response set, the Answer field at the top of the Skip/Filter Instructions window, which typically displays the answer number, displays the answer variable name instead.
 - You may enter the skip to location by using a relative skip.
To do this, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter +# or -# (where “+” and “-”, respectively, indicate whether to jump forward or backward in the questionnaire, and “#” is the number of response sets to jump when the skip criteria test “true”). For example, using the coffee example outlined previously, under the Skip To Q # heading in the cell beside the corresponding skip criteria, enter +14, where “+14” indicates that the questionnaire should skip forward 14 response sets (to the first demographic response set at the end of the questionnaire) if the corresponding skip criteria test “true.”
 - To create multiple skip instructions for a response set, repeat steps 2 and 3 as many times as desired on subsequent lines of the Skip/Filter Instructions window.
Note: The system evaluates skip instructions from top to bottom. When the first skip criteria test “true,” the system carries out the corresponding skip instruction and ignores any remaining skip instructions. When the first skip criteria test “false”, the system ignores the corresponding skip instruction and moves to evaluate the next skip criteria. The system continues in this manner from top to bottom through all of the skip instructions.
- To create unconditional skip instructions for a response set, complete one of the following steps on the last line of the Skip/Filter Instructions window.
 - Under the Skip/Filter Criteria heading, enter else; then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
- Under the Skip/Filter Criteria heading, enter true; then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
- Under the Skip/Filter Criteria heading, enter criteria that will always test “true” (e.g., 1=1, 2>1); then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
Note: Unconditional skip instructions (e.g., else, true, 1=1) should always be entered as the last skip instruction on the Skip/Filter Instructions window. This is because unconditional skip criteria always tests “true,” thereby ignoring any subsequent skip instructions.
 - To skip back to the corresponding Answer Editing window, select the Answer Editing button. Note: Selecting the Answer Editing button does not save any changes you made to the skip/filter instructions.
- To undo the last unsaved changes you made to the skip instructions, select Cancel. To save the current skip instructions, select Apply. To save the current skip instructions and close the Skip/Filter Instructions window, select Ok.
Creating Filter Instructions
Filter instructions are processed before their corresponding response set is displayed and determine based on the specified criteria whether that response set should be included in the questionnaire. If the criteria test “true”, the system will include the corresponding response set in the questionnaire; if the criteria test “false”, the system will exclude the corresponding response set from the questionnaire. For example, a response set asking for a favorite kind of apple (e.g., golden delicious, gala) may include filter instructions to include this response set only if the respondent previously indicated that they eat apples.
Note: The steps for creating filter instructions are very similar to those of creating skip instructions. For additional information, refer to Creating Skip Instructions.
To create filter instructions, complete the following steps.
- Open the Skip/Filter Instructions window in one of the following ways.
- Select the desired answer frame and then select Skip/Filter Instructions from the Utilities menu.
- Select the desired answer frame and then select Ctrl + K.
- Select the desired answer frame while holding down the Ctrl key.
- The Skip/Filter Instructions window opens. Under the Skip/Filter Criteria heading, enter the criteria for your filter instructions. You may enter filter criteria using the same types of information as for skip criteria (i.e., answer numbers, variable names, values, text, logical operators, mathematical operators, and mathematical functions).
These criteria must be statements that test “true” or “false” (e.g., q1=1, q1:1>2, fruit “no”, q1+q2<10). If the criteria test “true,” the system will include the corresponding response set in the questionnaire; if the criteria test “false,” the system will exclude the corresponding response set from the questionnaire and move respondents to the following question.
- Under the Skip To Q # heading in the cell beside the corresponding filter criteria, enter 0 (zero). A zero is this field indicates that if the filter criteria test “true,” the system will include the corresponding response set in the questionnaire; if the filter criteria test “false,” the system will exclude the corresponding response set from the questionnaire and move respondents to the following question.
- To create multiple filter instructions for a response set, repeat steps 2 and 3 as many times as desired on subsequent lines of the Skip/Filter Instructions window.
Note: The system evaluates filter instructions from top to bottom. When the first filter criteria test “true,” the system carries out the corresponding filter instruction and ignores any remaining filter instructions. When the first filter criteria test “false”, the system ignores the corresponding filter instruction and moves to evaluate the next filter criteria. The system continues in this manner from top to bottom through all of the filter instructions.
- To create unconditional filter instructions for a response set, complete one of the following steps as the last line of filter instructions on the Skip/Filter Instructions window. These instructions will redirect the questionnaire to another response set in the case that no other filter criteria test “true.”
- Under the Skip/Filter Criteria heading, enter otherwise; then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
- Under the Skip/Filter Criteria heading, enter true; then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
- Under the Skip/Filter Criteria heading, enter criteria that always test “true” (e.g., 1=1, 2>1); then, under the Skip to Q # heading, enter the corresponding skip instruction using a question number (e.g., 4, 9), a variable name (e.g., demographics), or a relative skip (e.g., +14, -3).
Note: Unconditional filter instructions (e.g., otherwise, true, 1=1) should always be entered as the last line of filter instructions on the Skip/Filter Instructions window. This is because unconditional filter criteria always test “true,” thereby ignoring any subsequent filter instructions.
- To skip back to the corresponding Answer Editing window, select the Answer Editing button. Note: Selecting the Answer Editing button does not save any changes you made to the skip/filter instructions.
- To undo the last unsaved change you made to the filter instructions, select Cancel. To save the current filter instructions, select Apply. To save the current filter instructions and close the Skip/Filter Instructions window, select Ok.
Creating Item Filter Instructions
Item filters are processed before their corresponding response set is displayed and determine based on specific criteria (e.g., a respondent’s answer to another response set) whether to enable or disable specific response items within an open-ended or fixed-choice response set. For example, a response set asking for a respondent’s favorite three activities may include item filter instructions to enable and disable specific response items based on a respondent’s selecting those activities in a previous response set as those in which they participate periodically.
Note: The steps for creating item filter instructions are very similar to those of creating skip instructions. For additional information, refer to Creating Skip Instructions.
To create item filter instructions, complete the following steps.
- Open the Skip/Filter Instructions window in one of the following ways.
- Select the desired answer frame and then select Skip/Filter Instructions from the Utilities menu.
- Select the desired answer frame and then select Ctrl + K.
- Select the desired answer frame while holding down the Ctrl key.
- The Skip/Filter Instructions window opens. Under the Skip/Filter Criteria heading, enter the item filter criteria in one of the following formats.
 - \#\xxxxx -- where the back slashes (i.e., \ \) in addition to the “-1” in the Skip to Q# field indicate that this is an item filter instruction rather than a skip or filter instruction, “#” is an integer that identifies the response item to enable if the criteria are met, and “xxxx” identifies the criteria to test.
Item filter criteria must be statements that test “true” or “false” [e.g., q1=1, q1:1>2, fruit “no”, q1+q2<10, (q1=1) or (q2=1)]. If the criteria test “true,” the system enables the corresponding response item; if the criteria test “false,” the system disables the corresponding response item.
You may enter item filter criteria using the same types of information as for skip criteria (i.e., answer numbers, variable names, values, text, skip/filter logical operators, skip/filter mathematical operators, and skip/filter mathematical functions).
Note: To view and test examples of questionnaires using this type of item filter criteria, download the ItemFilterExample1 and ItemFilterExample2 files by selecting these links and open them using the AskAnywhere Editor.
 - \x\buttonx(qid)=# -- where the back slashes (i.e., \ \) in addition to the “-1” in the Skip to Q# field indicate that this is an item filter instruction rather than a skip or filter instruction, “x” and “buttonx” enable any button in this answer set if the corresponding button’s value criteria are met, “qid” identifies the response set of the corresponding buttons [this can be either a question number (e.g., q1) or a variable name], and “#” identifies the criteria to test (1 to indicate that the corresponding response item was selected or 0 to indicate that the corresponding response item was not selected).
Use this format if you want to repeat a response set from one question to another and only enable those buttons in the 2nd question that the respondent did or did not select in the 1st question. This format saves the time of creating a different item filter instruction for each individual button. You can use this format from a fixed-choice to an open-ended question or from a fixed-choice to a fixed-choice question. You cannot use this format from an open-ended to a fixed-choice question or from an open-ended to an open-ended question.
Note: To view and test examples of questionnaires using this type of item filter criteria, download the ItemFilterExample3 file by selecting this link and open it using the AskAnywhere Editor.
Notes:
- The integer that identifies the response item to enable if the criteria are met is determined by that response item’s order in the definition of the response set, not the value assigned to that response item.
- The button(x) and button(1)/button(2)/etc. functions can only be used if the corresponding response set is a fixed-choice, multiple-response (i.e., Max value greater than 1) question.
-
Under the Skip To Q # heading in the cell beside the corresponding item filter instructions, enter -1 (where “-1” in addition to the back slashes in the Skip/Filter Criteria field indicate that this is an item filter instruction rather than a skip or filter instruction.
-
To create multiple item filter instructions for a response set, repeat steps 2 and 3 as many times as desired on subsequent lines of the Skip/Filter Instructions window.
Note: The system evaluates item filter instructions from top to bottom.
- To skip back to the corresponding Answer Editing window, select the Answer Editing button. Note: Selecting the Answer Editing button does not save any changes you made to the skip/filter instructions.
-
To undo the last unsaved change you made to the item filter instructions, select Cancel. To save the current item filter instructions, select Apply. To save the current item filter instructions and close the Skip/Filter Instructions window, select Ok.
Checking Skip/Filter Instruction Syntax
To check the syntax of your skip/filter instructions, complete one of the following steps.
- To check the syntax of the skip/filter instructions for the current question, from the Skip/Filter Instructions window select Check Syntax.
- To check the syntax for all of your skip/filter instructions throughout the questionnaire, from the Skip/Filter Instructions window select Check Syntax All.
Note: When you save skip/filter instructions, AskAnywhere automatically checks the syntax and provides error messages, when necessary.
Creating Other Numeric Response Item Questions | Table
of Contents | Creating Adaptive Questionnaires
© Copyright 2002-2004 Senecio Software, Inc. All rights reserved.
|