Pipe
Pipeing in SMP - Many options to create new answer lists
The pipe question type allows you to build complex code frames for future questions based on any number of questions previously asked. The many options available in SMP's "Pipe" enables great flexibility when piping previous question code frames through to new questions. Some of the more common uses for SMP's Pipe include:
Piping answers selected in a multi-select question type to another question type - text or image
Piping the answers not selected from a question
Piping answers from a combination of different questions in a combination of different ways,
Piping from a combination of different questions different outcomes such as those selected from one question plus those not selected in another question,
Piping a random set of answers selected from another question,
Adding new responses to a piped set,
Adding new responses to a piped set and selecting a random selection of this set,
Piping a different set of answers dependent on an answer given to another question,
And importantly - any combination of the above is possible making the pipe question type one of the most powerful options in SMP.
Pipes are constructed by building a pipe of answers from any number of previous questions or by adding additional answers into the pipe itself. The elements of the pipe question type are:
The question name - simply something you can use to identify your pipe to other questions
adds a criteria box - the building blocks of a pipe that adds answers from previous questions, and,
which adds answers in the usual manner to any other question type.
Some examples will best demonstrate how powerful pipe is and how to use it.
Example 1. Selecting a respondents main brand and brands they have also used into a new question.
The questions used for this example are:
Then we want to pipe all of the above answers except the one selected through to the next question, and ask;
In the above example the respondent chose Safari in the first question so it was not included in the next questions answer list. Then the respondent chose Firefox, Internet Explorer and Netscape as browsers they had used in the past.
We want to then combine the answers from the first question, main brand, with the second question, others used, and ask them to rate this combination of brands on ease of use.
To achieve this a Pipe question type is placed after the first question, Q1 Main brand, which selects all those answers not answered and creates a code frame for the next question, previously used.
First, create a new question by clicking on the green plus and make it a Pipe question type by selecting this type from the pop up.
The parameters that need completing are shown below. The criteria box is created by pressing the + button (shown circled in red).
First, give the question a name - in this case P1.
Next select the question that contains the items that you wish to use in your pipe - in this case Q1.
Then select the answers from this question that you wish to pass through to the next question if they match the criteria in the criteria box (circled above).
In this case we want every answer to be considered so we check every box.
Click on the criteria button (circled above) and the following popup will appear.
There are four conditions that you could choose here.
all: If the answer is to be considered (ie. it was checked in the check box) and was chosen in the question providing the answers then include it in the new pipe code frame.
Select by respondent: Means that if this answer was selected by the respondent and it is an answer to be considered (ie. it was checked in the check box) then include it in the new pipe code frame.
Not select by respondent: Means that if the answer is to be considered (ie. it was checked in the check box) and was NOT chosen by the respondent in the question providing the answers then include it in the new pipe code frame.
Q1: Allows the programmer to select a specific criteria that determines whether to include the answer or not based on a previous answer - conditional pipe. (more about this latter)
In the example above we have chosen "Not selected by respondent", because we want the answers that were not selected by the respondent to be passed through to the next question.
In our example above all answers except Safari will be piped through to the next question because Safari was chosen by the respondent.
To make this happen we set up the next question and include as its answer set the newly created pipe P1 in the question parameter "Piping From.
Add the question in the usual fashion:
then select P1 from the Piping from dropdown of Q3 Ever used parameters.
After they have made their selections from the subsequent question, Q3 Ever used, we then need to construct a new pipe which is a combination of the two questions, Q1 Main brand, and Ever used, to create a pipe of answers to send to the visual scale question shown above for the rating.
So, create a new question and make it a pipe question type giving it the name P2. Next press the to add a pipe criteria box.
This time we want to include the answer chosen in the first question from the entire list so check the box next to every possible answer and then press the criteria button and select the option "Select by respondent". The following will be the result.
Next we wish to add the answers from another question to the pipe. Press the button again and another criteria box will appear. This time we want to add to the pipe all the answers from the second question - supplementary brands, except for the "None" answer so it is not checked.
This Pipe question will now contain the answer from the main brand question and the answers from the Ever used question and can be used as the total answer set or code frame for any future questions.
This is done by selecting the Pipe question in the "Piping From" option in the answer parameters in all question types.
Conditional Pipe
This pipe type allows the user to construct different answer sets to a question dependent on the answer given to a previous question. In the following example the respondent is asked which brand of car they currently own. Dependent on the answer given they are then asked which model it is. Only the models relevant to each car brand are shown. For this example the researcher is only interested in two makes of car - Ford and Holden.
The first question looks like this:
If other is selected the respondent writes in the model and is then skipped over the following question using the Skip option in the question parameters.
In the above example Holden was selected so the following list of cars would be shown.
Had Ford been chosen a different list would have been preseneted. Acieving this with the pipe question type is easy.
Create a question type "Pipe" give it a name and then click on the add answers option icon.
This will create the following option box.
Press the "Select Condition" button and in the popup that appears click on "Select Condition" and navigate to the question that asks for Holden or Ford and create a condition where Holden is true. Your screen should look like this.
Once this is set start adding answers to your pipe by pressing on one of the three adding questions options common to all question types (shown circled below). Note that the Select Condition button now contains a description of your condition.
Continue until all the Holden types have been entered. To add the Ford answers you repeat the exercise.
Press the add answers box option at the top of the screen again:
Press "Select Condition" - this time selecting Ford is true, as we did above for Holden, then press then add the answers as we did previously.
Add this pipe, called P1, to the question parameter in the question you are designing to ask make and when Holden is chosen the Holden makes will be shown, and when Ford is chosen the Ford makes will be chosen.
If Other was chosen a skip rule or Gate would have been used to pass this question automatically.
Note: The Other (Write In) answer is added in the question itself in the usual fashion.
The parameters for Q2 would look like this;
Note the Piping From: drop down contains the pipe we just chose and the Other (Write In) with the text answer option selected was created in the question parameters.
Also note that you can now pipe the selection from this question as either an answer to another question or as an embed like the example below. In this exemple we embedded the answers from both Q1 and Q2 to build the total make and model. (see embedding for more on this feature)
Random Pipe
To use random pipe create your pipe in the way demonstrated above but this time type a number into the random number box. This will cause that number of random answers from the list to be chosen from the pipe you have created.
You could choose to pipe two of the answers form the entire list, two that where chosen, two that were not chosen or any combination.
Top / Bottom
The "top / bottom" option for a pipe will appear if the question type "Ranking" is selected. In the example below the top 3 ranked browsers by the respondent will be piped to the next question.
Set up three questions:
Then create the pipe using Q8 as the input question with the following criteria. Selecting a ranking type question type as the source will cause the Top/bottom drop down to appear. Choose Top and th enumber of top ranked answers that you wish to pipe through - in this case three.
Finally create Q9 Why in the usual manner by creating a Text Answer question type and include as a parameter the Pipe question above as the code frame. In this instance an answer box will be created for the top three browsers chosen by the respondent.
The final question will look like this.