Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

constructed list based on answered parts of the survey

Hi,

I have 3 main parts in my survey and some respondents will answer all parts & others just 2 out of the 3 parts. at the end I want them to tell me which part they fount the easiest & which was the hardest.
How could I automatically let the names of the parts they answered appear in a ranking question after they finish their survey noting that they will be assigned randomly to either answer all parts or just 2 of the 3 (any 2).

Regards'
asked Jun 15 by AMYN Bronze (1,335 points)

1 Answer

+1 vote
 
Best answer
I would create a parent list (call it PartList) as follows ...

Note: I'm not sure what question numbers define each part, but I'll use the following examples.

1-Part 1 (e.g. Q1-Q10)
2-Part 2 (e.g. Q11-Q20)
3-Part 3 (e.g. Q21-Q30)

Then I would create a constructed list that uses PartList as the parent list.
Begin Unverified Perl 
  
 if (VALUE("Q1")>0)
  {  
   ADD("PartList",1);
  }

 if (VALUE("Q11")>0)
  {  
   ADD("PartList",2);
  }

 if (VALUE("Q21")>0)
  {  
   ADD("PartList",3);
  }
  
 RANDOMIZE();
 
End Unverified

In my constructed list, I have basically said if the first question for each part is answered, then include that part. You may need to change the conditions as I'm not sure what type of questions they are. You could use the last question in each part or a question in the middle of each part. They will all work.

Now you can use this constructed list in your ranking question.
answered Jun 15 by Paul Moon Platinum (75,380 points)
selected Jun 15 by AMYN
Thank you, Paul, for the suggestion, the logic is perfect.
so if I will choose the first question in each part as follows that will be sufficient?
P1 is a BWS question, Should I write it as ( BWS_1_b>0)?
P2 is a DCE question, Should I write it as (TDCE_Random1>0)?
P3 is a select question, Should I write it as (QuestionNmae>0)?

As the following
Begin Unverified Perl 
   
 if (VALUE("TBWS_1_b")>0)
  {  
   ADD("TRankingList",1);
  }
 
 if (VALUE("TDCE_Random1")>0)
  {  
   ADD("TRankingList",2);
  }
 
 if (VALUE("TTTO0101D")>0)
  {  
   ADD("TRankingList",3);
  }
   
 RANDOMIZE();
  
End Unverified
If you are ever unsure of the question / variable name, I suggest looking in admin module in the data section or in the skip logic section and start to type the variable and a list of questions / variables will appear.

P1: looks correct assuming it is a MaxDiff? You could also use "TBWS_1_w".
P2: I am assuming this is a choice model variable which I'm unfamiliar with?
P3 is correct if it is single response.

Note: You can also use SSI Script functions like these in your Perl script ...

Answered(QuestionName)
Shown(QuestionName)

Hit F1 to search on the help on these functions. They come in handy.
P1 is a MaxDiff (we call it Best Worst State)
P2 is a CBC ( we call it Discrete Choice Experiment)
P3 is a single choice question
I will double check within the admin module, Which of the 2 scripts are more efficient? The SSI or the one already mentioned? so just put the name of the question between the brackets and that is it or there is some sort of a logical comparison?
Use the Perl Script. You can use those functions inside the Perl Script like this ...

if (ANSWERED("TTTO0101D"))
if (SHOWN("TTTO0101D"))

I'm familiar to some degree with MaxDiff but not the conjoint stuff. Your MaxDiff variable looks fine.

Using your script, here is an example ...
Begin Unverified Perl 
    
 if (ANSWERED("TBWS_1_b"))
  {  
   ADD("TRankingList",1);
  }
  
 if (ANSWERED("TDCE_Random1"))
  {  
   ADD("TRankingList",2);
  }
  
 if (ANSWERED("TTTO0101D"))
  {  
   ADD("TRankingList",3);
  }
    
 RANDOMIZE();
   
End Unverified
The is great, Thank you!!
Just ensure the questions you have chosen for each part are always answered within  their respective parts.

For example: Don't choose a question in Part 1 if it can be skipped in Part 1 when Part 1 is being answered.
...