Sawtooth Software: The Survey Software of Choice

If Then List Building

I need to build a list differently for each respondent based off of their answers to a previous question. I have one list that I will use in a select question where the values are an increasing range of years, for example, 0-2 years, 3-5 years, etc. Then, depending on how a respondent answers, I want a constructed list that is made up of all the values that are after the selected date range. How do I do this?

Let’s assume you had question called "HowLong" a list called “HowLongList” that had the following items:

1. 0-2
2. 3-5
3. 6-9
4. 10+

If we wanted to create a new list, called “HowLongConstructed”, and if a respondent chose item 1 then we want to add all 4 items to the new list, if they chose item 2 then we want to add items 2-4, if they chose item 3 then we want to add items 3-4, and if they chose item 4 then we would only add item 4.

Therefore in the constructed list logic for "HowLongConstructed", we would use the following code:

Begin Unverified Perl
if(VALUE("HowLong") == 1) {
 ADD("HowLongList", 1, 4);
}
if(VALUE("HowLong") == 2) {
 ADD("HowLongList", 2, 4);
}
if(VALUE("HowLong") == 3) {
 ADD("HowLongList", 3, 4);
}
if(VALUE("HowLong") == 4) {
 ADD("HowLongList", 4);
}
End Unverified

If you were using a numeric question first, then the code would change to something like this

Begin Unverified Perl
if(VALUE("HowLong")< 3) {
 ADD("HowLongList", 1, 4);
}
if(VALUE("HowLong") < 6) {
 ADD("HowLongList", 2, 4);
}
if(VALUE("HowLong") == 10) {
 ADD("HowLongList", 3, 4);
}
else {
 ADD("HowLongList", 4);
}
End Unverified

 For more information on list building, please review http://www.sawtoothsoftware.com/help/issues/ssiweb/online_help/index.html?hid_web_listbuilding.htm

Sawtooth Software

6:30 AM to 5:30 PM Mountain Time
(GMT-6; GMT-7 Autumn/Winter)
Monday through Friday

Phone: +1 801 477 4700
Fax: +1 801 434 5493
Email: support@sawtoothsoftware.com

SKIM Software

9:00 AM to 5:30 PM Central European
(GMT+2; GMT+1 Autumn/Winter)
Monday through Friday

Phone: +31 10 282 3500
Fax: +31 10 282 3560
Email: software@skimgroup.com
Online: www.skimgroup.com

Lighthouse Studio

Lighthouse Studio is our flagship software for producing and analyzing online and offline surveys. It contains modules for general interviewing, choice-based conjoint, adaptive choice-based conjoint, adaptive choice analysis, choice-value analysis, and maxdiff exercises.

Try Lighthouse Studio

  Buy Lighthouse Studio